fix: 修复验证码登录发送逻辑,未校验手机号或发送失败仍开始倒计时的问题 (#7616)

This commit is contained in:
Mr. Xie
2026-03-10 05:10:34 +08:00
committed by GitHub
parent 83a0c9662d
commit 7e0978c764
2 changed files with 5 additions and 1 deletions

View File

@@ -59,9 +59,9 @@ function handleComplete(e: string[]) {
async function handleSend(e: Event) {
try {
e?.preventDefault();
await handleSendCode();
countdown.value = maxTime;
startCountdown();
await handleSendCode();
} catch (error) {
console.error('Failed to send code:', error);
// Consider emitting an error event or showing a notification