From 397b31a548ea82bbd44fc2d9bbec04cebe725c8c Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Mon, 27 May 2024 15:40:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E7=A0=81=E7=99=BB=E5=BD=95=E6=97=B6=E5=9B=BE=E5=BD=A2=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=A0=81=E6=A0=A1=E9=AA=8C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/login.vue | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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(() => {