Skip to content

Commit 1b0064b

Browse files
committed
1. 微信 App 支付 WxAppPayClient 实现
2. 优化微信支付的下单逻辑,增加 build request 公用方法
1 parent 1f1f64e commit 1b0064b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/views/pay/cashier/index.vue

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,16 @@ export default {
212212
return;
213213
}
214214
215+
// 微信公众号、小程序支付,无法在 PC 网页中进行
216+
if (channelCode === PayChannelEnum.WX_PUB.code) {
217+
this.$message.error('微信公众号支付:不支持 PC 网站');
218+
return;
219+
}
220+
if (channelCode === PayChannelEnum.WX_LITE.code) {
221+
this.$message.error('微信小程序:不支持 PC 网站');
222+
return;
223+
}
224+
215225
// 默认的提交处理
216226
this.submit0(channelCode)
217227
},
@@ -292,7 +302,10 @@ export default {
292302
/** 提交支付后(App) */
293303
displayApp(channelCode, data) {
294304
if (channelCode === PayChannelEnum.ALIPAY_APP.code) {
295-
this.$message.error('支付宝 App 无法在网页支付!');
305+
this.$message.error('支付宝 App 支付:无法在网页支付!');
306+
}
307+
if (channelCode === PayChannelEnum.WX_APP.code) {
308+
this.$message.error('微信 App 支付:无法在网页支付!');
296309
}
297310
this.submitLoading = false
298311
},

0 commit comments

Comments
 (0)