From 1d13e8361e3555a2ce85fb150abed98da69d591c Mon Sep 17 00:00:00 2001 From: 15004070936 <1097449274@qq.com> Date: Wed, 16 Sep 2026 13:28:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=85=8D=E5=AF=86=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/login.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index 32001df..35f3c29 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -535,26 +535,21 @@ }); return; } - console.log(12) // 2. 防止重复点击(倒计时中) if (this.smsCountdown > 0) { return; } - console.log(34) // 3. 调用发送接口 uni.showLoading({ title: '发送中...' }); try { - console.log(56) const { data: res } = await uni.$http.post('/sms/sendCode', { phone: phone }); - console.log(78) uni.hideLoading(); - console.log(9) if (res && res.code === 200) { this.$refs.uToast.show({ title: '验证码已发送', @@ -563,6 +558,15 @@ }); // 开始倒计时 this.startCountdown(); + } else if (res && res.code === 201) { + this.$refs.uToast.show({ + title: '验证码已发送', + type: 'success', + duration: 2000 + }); + // 开始倒计时 + this.startCountdown(); + this.form.smsCode=res.data } else { this.$refs.uToast.show({ title: res.msg || '发送失败,请重试',