From 491e0f1ae2004aa0881f91cc7836ecb80396a8f7 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 19 Dec 2024 16:20:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8F=90=E7=8E=B0=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=99=A8=E6=9C=AA=E6=B8=85=E9=99=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/finance/storeincome.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/finance/storeincome.vue b/src/views/finance/storeincome.vue index 458cb0e..07a0b94 100644 --- a/src/views/finance/storeincome.vue +++ b/src/views/finance/storeincome.vue @@ -941,14 +941,15 @@ export default { reset() { console.log("reset"); this.msg = ""; - this.timer = null; - clearInterval(this.timer); this.msgTime = 60; + clearInterval(this.timer); + this.timer = null; }, sendMsg() { if (this.msgTime < 60) { return; } + var that = this; this.$http({ // url: this.$http.adornUrl('app/Login/sendMsg/'+this.tableData.mobile+'/regis'), url: this.$http.adornUrl( @@ -963,7 +964,9 @@ export default { type: "success", }); this.msgTime--; - this.timer = setInterval(() => { + clearInterval(this.timer); + that.timer = setInterval(() => { + console.log(this.msgTime); this.msgTime--; if (this.msgTime == 0) { clearInterval(this.timer); @@ -972,7 +975,7 @@ export default { }, 1000); } else { this.$message({ - message: res.data.msg|| "发送失败", + message: res.data.msg || "发送失败", type: "error", }); }