From d129c30bde5e9326a37e9e7c9e90a9bd82fa52db Mon Sep 17 00:00:00 2001 From: Nixevol Date: Sun, 25 Oct 2026 07:01:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9F=AD=E4=BF=A1=E8=AE=A4=E8=AF=81?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E8=BF=94=E5=9B=9E=E5=B9=B6=E5=9C=A8=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E9=AA=8C=E8=AF=81=E7=A0=81=E6=97=B6=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- desktop/src/features/auth/LoginView.vue | 18 ++++++++++++++++++ desktop/src/styles.css | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/desktop/src/features/auth/LoginView.vue b/desktop/src/features/auth/LoginView.vue index cdb5b73..3adacdb 100644 --- a/desktop/src/features/auth/LoginView.vue +++ b/desktop/src/features/auth/LoginView.vue @@ -118,6 +118,15 @@ async function useSaved() { } } +async function backFromSms() { + smsRequired.value = false; + stopCountdown(); + smsCode.value = ""; + smsHint.value = ""; + errorText.value = ""; + await reloadCaptcha(); +} + async function requestSms() { if (!sessionId.value || countdown.value > 0 || sending.value) return; sending.value = true; @@ -153,6 +162,14 @@ async function submit(smsCodeText = "") { smsHint.value = ""; return; } + if (result.status === "need_captcha") { + smsRequired.value = false; + stopCountdown(); + smsCode.value = ""; + errorText.value = result.message || ""; + await reloadCaptcha(true); + return; + } if (result.user) { smsRequired.value = false; stopCountdown(); @@ -238,6 +255,7 @@ onUnmounted(stopCountdown);

{{ smsHint }}

+ 返回 {{ countdown > 0 ? `重新发送(${countdown})` : "发送验证码" }} diff --git a/desktop/src/styles.css b/desktop/src/styles.css index b91fced..7b082e2 100644 --- a/desktop/src/styles.css +++ b/desktop/src/styles.css @@ -164,6 +164,10 @@ select { margin-top: 16px; } +.sms-back { + margin-right: auto; +} + .shell { height: 100%; display: grid;