Skip to content

Commit 1f1f64e

Browse files
committed
1. 修复支付宝 App 发起报错的问题
2. 移除微信 H5 支付,基本没人使用,减少复杂性
1 parent a9857f2 commit 1f1f64e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/utils/constants.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ export const PayDisplayModeEnum = {
177177
},
178178
QR_CODE: {
179179
"mode": "qr_code"
180+
},
181+
APP: {
182+
"mode": "app"
180183
}
181184
}
182185

src/views/pay/cashier/index.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default {
106106
code: "alipay_app"
107107
}, {
108108
name: '支付宝扫码支付',
109-
icon: require("@/assets/images/pay/icon/alipay_app.svg"),
109+
icon: require("@/assets/images/pay/icon/alipay_qr.svg"),
110110
code: "alipay_qr"
111111
}, {
112112
name: '支付宝条码支付',
@@ -237,6 +237,8 @@ export default {
237237
this.displayUrl(channelCode, data)
238238
} else if (data.displayMode === PayDisplayModeEnum.QR_CODE.mode) {
239239
this.displayQrCode(channelCode, data)
240+
} else if (data.displayMode === PayDisplayModeEnum.APP.mode) {
241+
this.displayApp(channelCode, data)
240242
}
241243
242244
// 打开轮询任务
@@ -270,7 +272,7 @@ export default {
270272
location.href = data.displayContent
271273
this.submitLoading = false
272274
},
273-
/** 提交支付后(支付宝扫码支付*/
275+
/** 提交支付后(扫码支付*/
274276
displayQrCode(channelCode, data) {
275277
let title = '请使用手机浏览器“扫一扫”';
276278
if (channelCode === PayChannelEnum.ALIPAY_WAP.code) {
@@ -287,6 +289,14 @@ export default {
287289
}
288290
this.submitLoading = false
289291
},
292+
/** 提交支付后(App) */
293+
displayApp(channelCode, data) {
294+
if (channelCode === PayChannelEnum.ALIPAY_APP.code) {
295+
this.$message.error('支付宝 App 无法在网页支付!');
296+
}
297+
this.submitLoading = false
298+
},
299+
290300
/** 轮询查询任务 */
291301
createQueryInterval() {
292302
if (this.interval) {

0 commit comments

Comments
 (0)