Commit 0744a7fb authored by 潘永坪's avatar 潘永坪

定时器清除

parent a2ea0cf0
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
sum += 700 sum += 700
} }
if (this.status == "2" || this.status == "4" || this.status == "5") { if (this.status == "2" || this.status == "4" || this.status == "5") {
uni.redirectTo({ // uni.redirectTo({
url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode // url:this.afterBuyUrl+'?orderId=' + this.orderId+'&ifyukuaiCode='+this.ifyukuaiCode
}) // })
return return
} }
if (this.status == "3") { if (this.status == "3") {
...@@ -55,9 +55,13 @@ ...@@ -55,9 +55,13 @@
} }
intFun() intFun()
}, },
beforeDestroy() { onHide() {
if (this.timer) {
clearInterval(this.timer)
}
},
onUnload() {
if (this.timer) { if (this.timer) {
//清除定时器
clearInterval(this.timer) clearInterval(this.timer)
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment