修复提现定时器未清除问题
This commit is contained in:
@@ -941,14 +941,15 @@ export default {
|
|||||||
reset() {
|
reset() {
|
||||||
console.log("reset");
|
console.log("reset");
|
||||||
this.msg = "";
|
this.msg = "";
|
||||||
this.timer = null;
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.msgTime = 60;
|
this.msgTime = 60;
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null;
|
||||||
},
|
},
|
||||||
sendMsg() {
|
sendMsg() {
|
||||||
if (this.msgTime < 60) {
|
if (this.msgTime < 60) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var that = this;
|
||||||
this.$http({
|
this.$http({
|
||||||
// url: this.$http.adornUrl('app/Login/sendMsg/'+this.tableData.mobile+'/regis'),
|
// url: this.$http.adornUrl('app/Login/sendMsg/'+this.tableData.mobile+'/regis'),
|
||||||
url: this.$http.adornUrl(
|
url: this.$http.adornUrl(
|
||||||
@@ -963,7 +964,9 @@ export default {
|
|||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
this.msgTime--;
|
this.msgTime--;
|
||||||
this.timer = setInterval(() => {
|
clearInterval(this.timer);
|
||||||
|
that.timer = setInterval(() => {
|
||||||
|
console.log(this.msgTime);
|
||||||
this.msgTime--;
|
this.msgTime--;
|
||||||
if (this.msgTime == 0) {
|
if (this.msgTime == 0) {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
|
|||||||
Reference in New Issue
Block a user