diff --git a/src/pages/login/verification/index.tsx b/src/pages/login/verification/index.tsx index cd3e35d..30d6c61 100644 --- a/src/pages/login/verification/index.tsx +++ b/src/pages/login/verification/index.tsx @@ -31,15 +31,15 @@ const VerificationPage: React.FC = () => { try { console.log('开始发送验证码,手机号:', phone); - + // 调用发送短信接口 const result = await send_sms_code(phone); - + console.log('发送验证码结果:', result); if (result.success) { console.log('验证码发送成功,开始倒计时'); - + Taro.showToast({ title: '验证码已发送', icon: 'success', @@ -49,7 +49,7 @@ const VerificationPage: React.FC = () => { // 开始倒计时 setCanSendCode(false); setCountdown(60); - + console.log('设置状态: can_send_code = false, countdown = 60'); // 发送验证码成功后,让验证码输入框获得焦点并调用系统键盘 @@ -81,7 +81,7 @@ const VerificationPage: React.FC = () => { // 倒计时效果 useEffect(() => { console.log('倒计时 useEffect 触发,countdown:', countdown); - + if (countdown > 0) { const timer = setTimeout(() => { console.log('倒计时减少,从', countdown, '到', countdown - 1); @@ -124,7 +124,7 @@ const VerificationPage: React.FC = () => { setTimeout(() => { Taro.redirectTo({ - url: '/pages/index/index' + url: '/pages/list/index' }); }, 200); } else { @@ -257,4 +257,4 @@ const VerificationPage: React.FC = () => { ); }; -export default VerificationPage; \ No newline at end of file +export default VerificationPage; \ No newline at end of file