From e99d17be57e4e51b916c95126d67af609e29c735 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Tue, 13 Aug 2024 10:32:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E7=99=BB=E5=BD=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/login.vue | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index d06c1bf..3deac9a 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -135,21 +135,37 @@ export default { phone: String(that.veriFormData.phone) }).then(res => { console.log(res); + if(res.data.code !== 200) { + // uni.showToast({ + // icon:'none', + // title:res.data.msg + // }) + uni.showModal({ + title: '提示',//标题 + content: res.data.msg,//提示内容 + showCancel: false//不显示取消按钮 + }) + } else{ + that.countDownStatus = 1 + that.sendDisabled = true + let timeInterval = setInterval(() => { + that.countDown -= 1 + }, 1000) + let timeOut = setTimeout(() => { + that.countDownStatus = 0 + that.countDown = 60 + that.sendDisabled = false + clearInterval(timeInterval) + clearTimeout(timeOut) + }, 1000 * 60) + } }).catch(err => { console.log(err); - }) - that.countDownStatus = 1 - that.sendDisabled = true - let timeInterval = setInterval(() => { - that.countDown -= 1 - }, 1000) - let timeOut = setTimeout(() => { - that.countDownStatus = 0 - that.countDown = 60 - that.sendDisabled = false - clearInterval(timeInterval) - clearTimeout(timeOut) - }, 1000 * 60) + uni.showToast({ + icon:'error', + title:'验证码获取失败' + }) + }) } }, veriSubmit() {