Commit 23868a0e authored by zengqiang's avatar zengqiang

Merge branch 'feature/2026-05-08-wechat-transfer' into 'test'

fix(withdraw): 处理微信确认收款回调结果 See merge request wykolor/mall-webview!20
parents 9f8b872b a62a68cc
......@@ -97,13 +97,15 @@ export default defineComponent({
try {
// 调用原生方法唤起微信确认收款
await requestMerchantTransfer({
const result = await requestMerchantTransfer({
mchId: this.mchId,
appId: this.appId,
package: this.packageInfo
})
// 跳转到处理状态页面
console.log('requestMerchantTransfer result:', result)
// 成功:跳转到处理状态页面
this.$router.replace({
path: '/withdraw/processing-status',
query: {
......@@ -112,9 +114,14 @@ export default defineComponent({
amount: this.amount
}
})
} catch (error) {
} catch (error: any) {
console.error('requestMerchantTransfer error:', error)
Toast.fail('确认收款失败')
// 用户取消
if (error.message === 'cancel') {
Toast('用户取消')
} else {
Toast.fail('操作失败')
}
}
},
handleBack () {
......
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