Skip to content

Commit 88fc72d

Browse files
committed
pay: 增加支付宝的条形码支付的配置
1 parent b76193c commit 88fc72d

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed
Lines changed: 2 additions & 0 deletions
Loading

src/utils/constants.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ export const PayChannelEnum = {
148148
"code": "alipay_qr",
149149
"name": "支付宝扫码支付"
150150
},
151+
ALIPAY_BAR: {
152+
"code": "alipay_bar",
153+
"name": "支付宝条码支付"
154+
},
151155
}
152156

153157
/**

src/views/pay/app/index.vue

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@
5353
</template>
5454
</el-table-column>
5555
<el-table-column label="商户名称" align="center" prop="payMerchant.name"/>
56-
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
57-
<template v-slot="scope">
58-
<span>{{ parseTime(scope.row.createTime) }}</span>
59-
</template>
60-
</el-table-column>
6156
<el-table-column label="支付宝配置" align="center">
6257
<el-table-column :label="payChannelEnum.ALIPAY_APP.name" align="center">
6358
<template v-slot="scope">
@@ -107,6 +102,18 @@
107102
</el-button>
108103
</template>
109104
</el-table-column>
105+
<el-table-column :label="payChannelEnum.ALIPAY_BAR.name" align="center">
106+
<template v-slot="scope">
107+
<el-button type="success" icon="el-icon-check" circle
108+
v-if="judgeChannelExist(scope.row.channelCodes,payChannelEnum.ALIPAY_BAR.code)"
109+
@click="handleUpdateChannel(scope.row,payChannelEnum.ALIPAY_BAR.code,payType.ALIPAY)">
110+
</el-button>
111+
<el-button v-else
112+
type="danger" icon="el-icon-close" circle
113+
@click="handleCreateChannel(scope.row,payChannelEnum.ALIPAY_BAR.code,payType.ALIPAY)">
114+
</el-button>
115+
</template>
116+
</el-table-column>
110117
</el-table-column>
111118
<el-table-column label="微信配置" align="center">
112119
<el-table-column :label="payChannelEnum.WX_LITE.name" align="center">

src/views/pay/order/submit.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export default {
8282
alipay_app: require("@/assets/images/pay/icon/alipay_app.svg"),
8383
alipay_wap: require("@/assets/images/pay/icon/alipay_wap.svg"),
8484
alipay_pc: require("@/assets/images/pay/icon/alipay_pc.svg"),
85+
alipay_bar: require("@/assets/images/pay/icon/alipay_bar.svg"),
8586
wx_app: require("@/assets/images/pay/icon/wx_app.svg"),
8687
wx_lite: require("@/assets/images/pay/icon/wx_lite.svg"),
8788
wx_pub: require("@/assets/images/pay/icon/wx_pub.svg"),
@@ -102,6 +103,11 @@ export default {
102103
form: { // 展示形式:form
103104
html: '',
104105
},
106+
barCode: { // 展示形式:条形码
107+
value: '',
108+
title: '',
109+
visible: false,
110+
},
105111
};
106112
},
107113
created() {
@@ -155,6 +161,16 @@ export default {
155161
},
156162
/** 提交支付 */
157163
submit(channelCode) {
164+
// 条形码支付,需要特殊处理
165+
if (channelCode === PayChannelEnum.ALIPAY_BAR.code) {
166+
167+
return;
168+
}
169+
170+
// 默认的提交处理
171+
this.submit0(channelCode)
172+
},
173+
submit0(channelCode) {
158174
this.submitLoading = true
159175
submitOrder({
160176
id: this.id,

0 commit comments

Comments
 (0)