feat: reset captcha field on login form submission failure

This commit is contained in:
wxg0103 2025-09-19 14:16:05 +08:00
parent e4232166e8
commit 2060012660
2 changed files with 2 additions and 0 deletions

View File

@ -269,6 +269,7 @@ const loginHandle = () => {
loading.value = false
loginForm.value.username = ''
loginForm.value.password = ''
loginForm.value.captcha = ''
const timestampKey = `${username}_chat_first_fail_timestamp`
if (!localStorage.getItem(timestampKey)) {
localStorage.setItem(timestampKey, Date.now().toString())

View File

@ -217,6 +217,7 @@ const loginHandle = () => {
loading.value = false
loginForm.value.username = ''
loginForm.value.password = ''
loginForm.value.captcha = ''
const timestampKey = `${username}_first_fail_timestamp`
if (!localStorage.getItem(timestampKey)) {
localStorage.setItem(timestampKey, Date.now().toString())