fix: 退出后不保留登录状态,调试输出改为总开关
This commit is contained in:
+6
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user