修正864未扫码阶段的登录引导文案

This commit is contained in:
liuwei
2026-05-07 14:53:05 +08:00
parent ba4c20d2f2
commit 44a3545bbb

View File

@@ -269,7 +269,18 @@ class Server864RuntimeMixin:
# 2. 结合服务端源码,这类 `state=4` 更接近终态/失效态,而不是可继续等待的中间态;
# 3. 因此这里把它单独识别出来,避免 Dashboard 长时间卡在“等待安全验证”的旧文案。
raw_status_text = str(login_status.get("msg") or login_status.get("loginState") or "").strip()
if raw_state == 4:
if raw_state == 0:
# 864 有时会把上一轮登录留下的 VerificationUrl 一起带回来:
# 1. 但当 `raw_state=0` 时,真实含义仍然是“当前二维码等待扫码”;
# 2. 若继续优先展示旧验证链接,前端就会出现“明明没扫却提示去安全验证”的误导;
# 3. 因此这里明确以原始状态为准,并主动忽略这类陈旧 VerificationUrl。
provider_stage = "waiting_scan" if uuid else "login_required"
status = "waiting"
status_text = raw_status_text or "等待扫码登录"
verification_url = ""
nick_name = ""
head_img_url = ""
elif raw_state == 4:
provider_stage = "login_required"
status = "expired"
if verification_url:
@@ -297,7 +308,7 @@ class Server864RuntimeMixin:
status = "waiting"
status_text = raw_status_text or "等待扫码登录"
if verification_url and raw_state != 4 and not raw_status_text:
if verification_url and raw_state not in {0, 4} and not raw_status_text:
status_text = "扫码已完成,请继续打开验证链接完成安全验证"
await self._safe_callback(