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,21 +146,25 @@ ...@@ -149,21 +146,25 @@
}) })
return return
} }
uni.showModal({ let timer = setTimeout(res=>{
title: '提示', clearTimeout(timer)
content: '支付结果', uni.showModal({
confirmText:'成功', title: '提示',
cancelText:'失败', content: '支付结果',
success: function (res) { confirmText:'成功',
if (res.confirm) { cancelText:'失败',
// console.log(res.confirm,'res.confirm') success: function (res) {
self.pending() if (res.confirm) {
} else if (res.cancel) { // console.log(res.confirm,'res.confirm')
self.saving = false self.pending()
console.log('用户点击取消'); } else if (res.cancel) {
} self.saving = false
} console.log('用户点击取消');
}); }
}
});
},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