From 70174393562761e69ceeced6dfbb5ce3f3664c5e Mon Sep 17 00:00:00 2001 From: argszero Date: Fri, 21 Aug 2026 13:05:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20login=20403=20(unverified=20email)?= =?UTF-8?q?=20=E2=86=92=20redirect=20to=20verify=20form=20+=20auto=20resen?= =?UTF-8?q?d=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rant 2026-08-21T12:31:48: logging in with an unverified account returned 403 with only a toast — no way to reach the verification code form. Add a 403 branch to the login submit catch: - prefill #verify-email with the attempted email - showAuthForm("verify") to reveal the code form + resend button - auto-trigger #resend-btn click to send the code immediately - bump cache-busting version to 20260821-1 --- ui/index.html | 10 +++++----- ui/js/app.js | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/index.html b/ui/index.html index b61c83d..b5f2156 100644 --- a/ui/index.html +++ b/ui/index.html @@ -5,7 +5,7 @@ AITokenPool - + @@ -673,9 +673,9 @@

使用模型

- - - - + + + + diff --git a/ui/js/app.js b/ui/js/app.js index 93043e0..709f9d1 100644 --- a/ui/js/app.js +++ b/ui/js/app.js @@ -2497,6 +2497,12 @@ setFieldError($("#login-pass"), T("login.err.bad")); clearFieldError($("#login-email")); $("#login-pass").focus(); + } else if (err && err.status === 403) { + // 邮箱未验证 → 切验证码界面 + 预填邮箱 + 自动发码(rant 2026-08-21T12:31:48) + $("#verify-email").value = email; + showAuthForm("verify"); + const rb = $("#resend-btn"); + if (rb) rb.click(); // 立即发验证码(60s 限频由后端 429 兜底提示) } else { toast((err && err.message) ? I18n.mapErr(err.message) : T("login.err.fail"), "error"); }