1. 微信 App 支付 WxAppPayClient 实现

2. 优化微信支付的下单逻辑,增加 build request 公用方法
This commit is contained in:
YunaiV
2023-07-24 22:07:54 +08:00
parent 0fcc0072c2
commit 3a1694dea3
5 changed files with 91 additions and 41 deletions

View File

@ -212,6 +212,16 @@ export default {
return;
}
// 微信公众号、小程序支付,无法在 PC 网页中进行
if (channelCode === PayChannelEnum.WX_PUB.code) {
this.$message.error('微信公众号支付:不支持 PC 网站');
return;
}
if (channelCode === PayChannelEnum.WX_LITE.code) {
this.$message.error('微信小程序:不支持 PC 网站');
return;
}
// 默认的提交处理
this.submit0(channelCode)
},
@ -292,7 +302,10 @@ export default {
/** 提交支付后App */
displayApp(channelCode, data) {
if (channelCode === PayChannelEnum.ALIPAY_APP.code) {
this.$message.error('支付宝 App 无法在网页支付!');
this.$message.error('支付宝 App 支付:无法在网页支付!');
}
if (channelCode === PayChannelEnum.WX_APP.code) {
this.$message.error('微信 App 支付:无法在网页支付!');
}
this.submitLoading = false
},