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(() => { }) },