【类 型】:feat
【原 因】: 【过 程】:支付成功或失败后 都跳转到 订单列表页面 【影 响】: # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
9b7ca6de06
commit
bd01b17c24
@ -129,6 +129,12 @@
|
|||||||
title: '支付失败',
|
title: '支付失败',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
})
|
})
|
||||||
|
// 延迟跳转到首页
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/main/order',
|
||||||
|
})
|
||||||
|
}, 1500) // 1.5秒后跳转
|
||||||
console.error(res.data.msg)
|
console.error(res.data.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -142,23 +148,33 @@
|
|||||||
signType: payMsg.signType,
|
signType: payMsg.signType,
|
||||||
paySign: payMsg.paySign,
|
paySign: payMsg.paySign,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.status === 1) {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功',
|
title: '支付成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
// 延迟跳转到首页
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/main/order',
|
||||||
|
})
|
||||||
|
}, 1500) // 1.5秒后跳转
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
|
console.error('支付失败:', err)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付失败',
|
title: '支付失败',
|
||||||
icon: 'error'
|
icon: 'error'
|
||||||
})
|
})
|
||||||
console.error(err)
|
// 延迟跳转到首页
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/main/order',
|
||||||
|
})
|
||||||
|
}, 1500) // 1.5秒后跳转
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
Loading…
Reference in New Issue
Block a user