From 6fcd58a04b02dd4ea87af6ee0dc9bd10fb9eb9ea Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.com> Date: Fri, 24 Dec 2021 16:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E5=8F=91=E9=80=81=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=BB=E7=A7=92=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epidemic/epidemicreportuserinfo.vue | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/views/modules/epidemic/epidemicreportuserinfo.vue b/src/views/modules/epidemic/epidemicreportuserinfo.vue index cbaaad6..7d2bc1c 100644 --- a/src/views/modules/epidemic/epidemicreportuserinfo.vue +++ b/src/views/modules/epidemic/epidemicreportuserinfo.vue @@ -518,8 +518,8 @@ 验证码将下发到 {{this.checkMobile}} ,请注意查收。 - - 获取验证码 + + {{this.buttonName}} @@ -656,7 +656,10 @@ export default { detailVisible: false, dialogVisibleSMS: false, smsCode: '', - checkMobile: '' + checkMobile: '', + isDisabled: false, + buttonName: "发送验证码", + buttonTime: 60 } }, created: function () { @@ -996,6 +999,17 @@ export default { if (res.code !== 0) { return this.$message.error(res.msg) } + var countDown = setInterval(() => { + if (this.buttonTime < 1) { + this.isDisabled = false + this.buttonName = '获取验证码' + this.buttonTime = 60 + clearInterval(countDown) + } else { + this.isDisabled = true + this.buttonName = '(' + --this.buttonTime + '秒)后重新发送' + } + }, 1000) }) .catch(() => { }) },