【类 型】:feat
【主 题】:支付失败 弹出提示框 打印失败原因 【描 述】: [原因]: [过程]: [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
6169b90c0d
commit
3c35089f07
@ -34,6 +34,12 @@
|
||||
if (res.data.status === 1) {
|
||||
// 调用微信支付接口
|
||||
this.requestPayment(res.data.payMsg);
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'error'
|
||||
});
|
||||
console.error(res.data.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -46,18 +52,19 @@
|
||||
signType: payMsg.signType,
|
||||
paySign: payMsg.paySign,
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
});
|
||||
// 可以在这里处理支付成功后的逻辑
|
||||
if(res.status===1){
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none'
|
||||
icon: 'error'
|
||||
});
|
||||
console.error(err);
|
||||
console.error(err)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user