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

定时器清除

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