From 730007f121c73c036edb79d94a877f3e8534dde8 Mon Sep 17 00:00:00 2001 From: jeremygan2021 Date: Wed, 28 Jan 2026 23:44:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=A1=B5=E9=9D=A2=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E4=B8=80=E8=87=B4=E6=80=A7=E4=BB=A5=E5=8F=8A=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/index.html | 5 +++++ 1 file changed, 5 insertions(+) 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; } }