fix: 退出后不保留登录状态,调试输出改为总开关

This commit is contained in:
Nixevol
2026-10-16 15:39:05 +08:00
parent 543fcce134
commit d5dcd7086d
7 changed files with 253 additions and 51 deletions
+6 -1
View File
@@ -440,6 +440,7 @@
const $ = (id) => document.getElementById(id);
let lastKey = "";
let captchaReady = false;
let loginEpoch = null;
let qrTimer = 0;
let qrMode = false;
let smsLeft = 0;
@@ -497,8 +498,12 @@
if (data.phone) savedPhone = data.phone;
if (!$("phone").value && data.phone) $("phone").value = data.phone;
const reuse = canResume && $("phone").value.trim() === savedPhone;
const nextEpoch = Number.isInteger(data.loginEpoch) ? data.loginEpoch : 0;
const epochChanged = loginEpoch !== nextEpoch;
loginEpoch = nextEpoch;
$("verify").hidden = !data.needLogin || reuse;
if (data.needLogin && !reuse && !captchaReady) {
if (data.needLogin && !reuse && (epochChanged || !captchaReady)) {
if (epochChanged) $("imageCode").value = "";
loadCaptcha();
captchaReady = true;
}