From c6d7d8b92df1d1234928b1231a0f24ada40495a0 Mon Sep 17 00:00:00 2001 From: mohe Date: Sat, 8 Aug 2026 01:36:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BE=AE=E4=BF=A1=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=E4=BC=98?= =?UTF-8?q?=E5=85=88(logged=20in/Message),=20=E6=B6=88=E9=99=A4=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E6=97=A5=E5=BF=97=E5=B9=B2=E6=89=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gateway/scripts/dashboard.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gateway/scripts/dashboard.py b/gateway/scripts/dashboard.py index efab076..4d48c42 100644 --- a/gateway/scripts/dashboard.py +++ b/gateway/scripts/dashboard.py @@ -1823,9 +1823,20 @@ def api_wechat_status(): _dlogs = _dr.stdout + _dr.stderr _showing_qr = ("扫描以下二维码" in _dlogs) or ("Access the URL to login" in _dlogs) _login_err = _dlogs.count("loginCheck") >= 2 + _logged_in = "logged in" in _dlogs + _has_msg = "Message:" in _dlogs except Exception: _showing_qr = False _login_err = False + _logged_in = False + _has_msg = False + # 登录成功是最高优先级: 有 logged in 或正在收发消息 = 已登录 + if _logged_in or _has_msg: + result["online"] = True + result["message"] = "已登录" + result["qr_url"] = None + result["qr_timestamp"] = None + return jsonify(result) if _showing_qr: result["online"] = False result["message"] = "等待扫码登录"