diff --git a/sgzb-ui/src/views/login.vue b/sgzb-ui/src/views/login.vue index d0aeb302..281c8f09 100644 --- a/sgzb-ui/src/views/login.vue +++ b/sgzb-ui/src/views/login.vue @@ -413,15 +413,19 @@ export default { if (res.code == 200) { this.$modal.msgSuccess('发送成功') const TIME_COUNT = 60 - this.timer = setInterval(() => { - if (this.count > 0 && this.count <= TIME_COUNT) { - this.count-- - } else { - this.show = 3 - clearInterval(this.timer) - this.timer = null - } - }, 1000) + if (!this.timer) { + this.count = TIME_COUNT + this.show = 2 + this.timer = setInterval(() => { + if (this.count > 0 && this.count <= TIME_COUNT) { + this.count-- + } else { + this.show = 3 + clearInterval(this.timer) + this.timer = null + } + }, 1000) + } } }) .finally(() => {