支付返回,修改禅道bug
This commit is contained in:
@@ -32,8 +32,28 @@
|
||||
}
|
||||
// 有 token:已在首页,不做跳转
|
||||
})
|
||||
onShow(() =>{
|
||||
console.log('App Show')
|
||||
onShow((options) => {
|
||||
console.log('App Show', options)
|
||||
|
||||
// 处理从小程序返回的支付结果
|
||||
if (options && options.referrerInfo && options.referrerInfo.extraData) {
|
||||
const extraData = options.referrerInfo.extraData
|
||||
console.log('小程序返回数据:', extraData)
|
||||
if (extraData.retCode === 'SUCCESS') {
|
||||
// 支付成功:返回缴费列表页并刷新数据
|
||||
uni.showToast({ title: '支付成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
})
|
||||
}, 1500)
|
||||
return
|
||||
} else if (extraData.retCode === 'FAIL') {
|
||||
uni.showToast({ title: extraData.retMsg || '支付失败', icon: 'none' })
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 每次回到前台时检查 CID 是否有效,没有则重新获取
|
||||
const savedCid = uni.getStorageSync('push_cid')
|
||||
|
||||
Reference in New Issue
Block a user