Commit 4a62675b authored by 李俊赕's avatar 李俊赕

定时器清除

parent 8f56d232
...@@ -294,8 +294,10 @@ ...@@ -294,8 +294,10 @@
if (res.data.data.answerList) { if (res.data.data.answerList) {
that.handleData() that.handleData()
that.currentTime = 100 that.currentTime = 100
that.isSelect = false//重置 that.isSelect = false
clearTimeout(this.timer)
that.startCounting() that.startCounting()
} else { } else {
that.isSelect = true that.isSelect = true
...@@ -346,6 +348,7 @@ ...@@ -346,6 +348,7 @@
if (this.currentTime > 0) { if (this.currentTime > 0) {
this.timer = setTimeout(this.startCounting, 1000); this.timer = setTimeout(this.startCounting, 1000);
} else { } else {
clearTimeout(this.timer)
this.currentTime = 100 this.currentTime = 100
this.nextClick() this.nextClick()
} }
......
...@@ -130,8 +130,6 @@ ...@@ -130,8 +130,6 @@
title:'支付中……' title:'支付中……'
}) })
// 提交支付订单 // 提交支付订单
// wx_lite
// appid:wxd1d6eede324b0465
const code = await this.getCode() const code = await this.getCode()
const params = { const params = {
oid: this.settledInfo.record.id, oid: this.settledInfo.record.id,
...@@ -140,7 +138,6 @@ ...@@ -140,7 +138,6 @@
code:code code:code
// appid:'wxd1d6eede324b0465' // appid:'wxd1d6eede324b0465'
} }
// const codeApiUrl = globalUrl.codeUrl.apiUrl;
const response = await this.$u.api.paySettleDeposit(params) const response = await this.$u.api.paySettleDeposit(params)
if (response.status!==true) { if (response.status!==true) {
uni.showToast({ uni.showToast({
...@@ -149,6 +146,8 @@ ...@@ -149,6 +146,8 @@
}) })
return return
} }
let timer = setTimeout(res=>{
clearTimeout(timer)
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '支付结果', content: '支付结果',
...@@ -164,6 +163,8 @@ ...@@ -164,6 +163,8 @@
} }
} }
}); });
},1000)
const { const {
charge, charge,
oid oid
...@@ -180,11 +181,7 @@ ...@@ -180,11 +181,7 @@
}) })
} else if (result == "fail") { } else if (result == "fail") {
// charge 不正确或者微信公众账号/QQ 公众号/支付宝口碑支付失败时会在此处返回 // charge 不正确或者微信公众账号/QQ 公众号/支付宝口碑支付失败时会在此处返回
console.log(err.msg) // console.log(err.msg)
// uni.showToast({
// title: err.msg,
// icon:'none'
// })
} else if (result == "cancel") { } else if (result == "cancel") {
// 微信公众账号、QQ 公众号、支付宝口碑支付取消支付 // 微信公众账号、QQ 公众号、支付宝口碑支付取消支付
uni.showToast({ uni.showToast({
......
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