修复支付提示取消的问题,修改用户中心无法自动登录的问题

This commit is contained in:
gaoxs
2020-06-08 20:06:16 +08:00
parent c259d5d57c
commit 391055e68a
5 changed files with 17 additions and 42 deletions

View File

@ -98,10 +98,12 @@ export function payOrderHandle(orderId, type, from) {
weappPay(data.result.jsConfig).then(res => {
resolve(data);
});
break;
case "WECHAT_APP_PAY":
weappPay(data.result.jsConfig).then(res => {
resolve(data);
});
break;
}
})
.catch(err => {

View File

@ -14,7 +14,7 @@ export const weappPay = (option) => {
sign: option.sign,
timestamp: option.timestamp + '',
}
// 调用登录接口
// 调用接口
uni.requestPayment({
provider: 'wxpay',
...option,
@ -23,9 +23,12 @@ export const weappPay = (option) => {
success: (success) => {
console.log(success)
uni.showToast({
title: '支付成功', icon: 'success', duration: 5000
title: '支付成功', icon: 'success', duration: 5000,
});
resolve(success)
let time = setTimeout(() => {
clearTimeout(time)
resolve(success)
}, 3000)
},
fail: (error) => {
console.log(error)