From 37886ce0f5ed8509be5ac2a5c31dacb50e82d3c5 Mon Sep 17 00:00:00 2001 From: beginner <52942568@qq.com> Date: Sun, 2 Nov 2025 23:48:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(login):=20=E6=B7=BB=E5=8A=A0=E4=BA=86?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E9=94=99=E8=AF=AF=E6=97=B6=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E8=BE=93=E5=85=A5=E6=A1=86=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在获取新验证码后清空输入框,避免残留旧验证码影响用户体验 --- src/views/login.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/login.vue b/src/views/login.vue index f6415492..091a5627 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -160,6 +160,8 @@ const handleLogin = () => { // 重新获取验证码 if (captchaEnabled.value) { await getCode(); + // 清空验证码输入框 + loginForm.value.code = ''; } } } else { From 10ad80b0eaf5c3ed93a9e66593314681be8932da Mon Sep 17 00:00:00 2001 From: beginner <52942568@qq.com> Date: Mon, 3 Nov 2025 00:00:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(login):=20=E5=88=B7=E6=96=B0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E6=97=B6=E6=B8=85=E7=A9=BA=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E8=BE=93=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整验证码刷新逻辑,确保每次获取新验证码时都清空验证码输入框的内容 --- src/views/login.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/login.vue b/src/views/login.vue index 091a5627..dad7945e 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -160,8 +160,6 @@ const handleLogin = () => { // 重新获取验证码 if (captchaEnabled.value) { await getCode(); - // 清空验证码输入框 - loginForm.value.code = ''; } } } else { @@ -178,6 +176,8 @@ const getCode = async () => { const { data } = res; captchaEnabled.value = data.captchaEnabled === undefined ? true : data.captchaEnabled; if (captchaEnabled.value) { + // 刷新验证码时清空输入框 + loginForm.value.code = ''; codeUrl.value = 'data:image/gif;base64,' + data.img; loginForm.value.uuid = data.uuid; }