From 1f7dedf8666e1661f6aad169328de32f77eec7f8 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 7 May 2026 15:32:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=99=BB=E5=BD=95=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=B1=95=E7=A4=BA864=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/templates/index.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/admin/dashboard/templates/index.html b/admin/dashboard/templates/index.html index aa62e30..f71002d 100644 --- a/admin/dashboard/templates/index.html +++ b/admin/dashboard/templates/index.html @@ -172,6 +172,10 @@ UUID {% raw %}{{ loginQrCurrent.uuid || '-' }}{% endraw %} +
+ 登录方式 + {% raw %}{{ loginQrWayText }}{% endraw %} +
原始状态 {% raw %}{{ formatLoginQrRawState(loginQrCurrent.raw_state) }}{% endraw %} @@ -707,6 +711,21 @@ } return '登录引导中'; }, + loginQrWayText() { + const normalizedWay = String(this.loginQrCurrent.login_way || '').trim().toLowerCase(); + const wayMap = { + mac: 'mac', + win: 'win', + harmony: 'harmony', + car: 'car', + watch: 'watch' + }; + // 弹窗里直接显示当前实际使用的登录终端形态: + // 1. 864 的二维码接口会根据 `Way` 走不同的登录链路,联调时很容易忘记当前到底用的是哪一档; + // 2. 用户已经明确在 `.env` 中切到了 `WECHAT_LOGIN_WAY=harmony`,这里展示出来能立刻确认配置有没有真的生效; + // 3. 若后续 provider 回传了别的兼容值,也保留原文,避免前端把未知新值错误折叠掉。 + return wayMap[normalizedWay] || normalizedWay || '-'; + }, loginQrCountdownText() { if (this.loginQrDialog.logged_in) { return '已登录';