修复提现定时器未清除问题
This commit is contained in:
parent
35eaae83dc
commit
491e0f1ae2
|
|
@ -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",
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue