diff --git a/templates/index.html b/templates/index.html
index eb8fc5d..47db761 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1076,6 +1076,9 @@
let count = 60;
const originalText = "发送验证码";
+ // Show loading state
+ btn.innerHTML = ' 发送中...';
+
try {
const res = await fetch('/api/send-sms', {
method: 'POST',
@@ -1099,11 +1102,13 @@
errorDiv.textContent = data.message || '发送失败';
errorDiv.classList.remove('hidden');
btn.disabled = false;
+ btn.innerText = originalText;
}
} catch (e) {
errorDiv.textContent = '网络错误';
errorDiv.classList.remove('hidden');
btn.disabled = false;
+ btn.innerText = originalText;
}
}