From 5288dbf9b0430424ea4c5be22103deb7cb9ef366 Mon Sep 17 00:00:00 2001
From: xiaowang <2161656029@qq.com>
Date: Wed, 16 Sep 2026 10:47:01 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=AA=8C=E8=AF=81=E7=A0=81?=
=?UTF-8?q?=E6=9C=89=E6=95=88=E6=9C=9F=E6=8F=90=E7=A4=BA=E5=92=8C=E9=87=8D?=
=?UTF-8?q?=E5=8F=91=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
JC-Salon-WeChat/pages/login/index.js | 2 ++
JC-Salon-WeChat/pages/login/index.wxml | 2 +-
JC-Salon-WeChat/pages/register/index.js | 3 ++-
JC-Salon-WeChat/pages/register/index.wxml | 2 +-
4 files changed, 6 insertions(+), 3 deletions(-)
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 ? '✓' : ''}}我已阅读并同意《用户协议》和《隐私政策》使用密码注册 ›
设置密码确认密码