diff --git a/JC-Salon-WeChat/pages/login/index.js b/JC-Salon-WeChat/pages/login/index.js
index 15c766bf..10fc2401 100644
--- a/JC-Salon-WeChat/pages/login/index.js
+++ b/JC-Salon-WeChat/pages/login/index.js
@@ -89,6 +89,7 @@ Page({
loading: false,
codeLoading: false,
countdown: 0,
+ codeSent: false,
countdownTimer: null,
agreementAccepted: false,
agreementLoading: false,
@@ -153,6 +154,7 @@ Page({
try {
await authApi.sendLoginCode(phone)
wx.showToast({ title: '验证码已发送' })
+ this.setData({ codeSent: true })
this.startCountdown()
} catch (error) {
wx.showToast({ title: error.message || '验证码发送失败', icon: 'none' })
diff --git a/JC-Salon-WeChat/pages/login/index.wxml b/JC-Salon-WeChat/pages/login/index.wxml
index f95afb5f..4d28af6c 100644
--- a/JC-Salon-WeChat/pages/login/index.wxml
+++ b/JC-Salon-WeChat/pages/login/index.wxml
@@ -31,7 +31,7 @@
diff --git a/JC-Salon-WeChat/pages/register/index.js b/JC-Salon-WeChat/pages/register/index.js
index a09d4b9c..c2e958e8 100644
--- a/JC-Salon-WeChat/pages/register/index.js
+++ b/JC-Salon-WeChat/pages/register/index.js
@@ -18,6 +18,7 @@ Page({
loading: false,
codeLoading: false,
countdown: 0,
+ codeSent: false,
countdownTimer: null,
agreementAccepted: false
},
@@ -58,7 +59,7 @@ Page({
if (!PHONE_REGEX.test(phone)) { wx.showToast({ title: '请输入正确手机号', icon: 'none' }); return }
if (this.data.codeLoading || this.data.countdown > 0) return
this.setData({ codeLoading: true })
- try { await authApi.sendCode(phone); wx.showToast({ title: '验证码已发送' }); this.startCountdown() } catch (error) { wx.showToast({ title: error.message || '发送失败', icon: 'none' }) } finally { this.setData({ codeLoading: false }) }
+ try { await authApi.sendCode(phone); wx.showToast({ title: '验证码已发送' }); this.setData({ codeSent: true }); this.startCountdown() } catch (error) { wx.showToast({ title: error.message || '发送失败', icon: 'none' }) } finally { this.setData({ codeLoading: false }) }
},
continueFromPhone() {
diff --git a/JC-Salon-WeChat/pages/register/index.wxml b/JC-Salon-WeChat/pages/register/index.wxml
index 7aadaa20..94ed8d83 100644
--- a/JC-Salon-WeChat/pages/register/index.wxml
+++ b/JC-Salon-WeChat/pages/register/index.wxml
@@ -4,7 +4,7 @@
验证手机号手机号将作为你的工作台登录账号
手机号手机号已验证
- 验证码
+ 验证码
{{agreementAccepted ? '✓' : ''}}我已阅读并同意《用户协议》和《隐私政策》使用密码注册 ›
设置密码确认密码