Skip to content

Commit 7108cde

Browse files
committed
【功能优化】支付:支付应用,增加 appKey 标识,用于不同接入方的标识
1 parent e01883d commit 7108cde

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

src/api/pay/app/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import request from '@/config/axios'
22

33
export interface AppVO {
44
id: number
5+
appKey: string
56
name: string
67
status: number
78
remark: string

src/views/pay/app/components/AppForm.vue

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<el-form-item label="应用名" prop="name">
1111
<el-input v-model="formData.name" placeholder="请输入应用名" />
1212
</el-form-item>
13+
<el-form-item label="应用标识" prop="name">
14+
<el-input v-model="formData.appKey" placeholder="请输入应用标识" />
15+
</el-form-item>
1316
<el-form-item label="开启状态" prop="status">
1417
<el-radio-group v-model="formData.status">
1518
<el-radio
@@ -55,16 +58,15 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
5558
const formData = ref({
5659
id: undefined,
5760
name: undefined,
58-
packageId: undefined,
59-
contactName: undefined,
60-
contactMobile: undefined,
61-
accountCount: undefined,
62-
expireTime: undefined,
63-
domain: undefined,
64-
status: CommonStatusEnum.ENABLE
61+
appKey: undefined,
62+
status: CommonStatusEnum.ENABLE,
63+
remark: undefined,
64+
orderNotifyUrl: undefined,
65+
refundNotifyUrl: undefined
6566
})
6667
const formRules = reactive({
6768
name: [{ required: true, message: '应用名不能为空', trigger: 'blur' }],
69+
appKey: [{ required: true, message: '应用标识不能为空', trigger: 'blur' }],
6870
status: [{ required: true, message: '开启状态不能为空', trigger: 'blur' }],
6971
orderNotifyUrl: [{ required: true, message: '支付结果的回调地址不能为空', trigger: 'blur' }],
7072
refundNotifyUrl: [{ required: true, message: '退款结果的回调地址不能为空', trigger: 'blur' }]
@@ -123,7 +125,8 @@ const resetForm = () => {
123125
status: CommonStatusEnum.ENABLE,
124126
remark: undefined,
125127
orderNotifyUrl: undefined,
126-
refundNotifyUrl: undefined
128+
refundNotifyUrl: undefined,
129+
appKey: undefined
127130
}
128131
formRef.value?.resetFields()
129132
}

src/views/pay/app/index.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
<!-- 列表 -->
6565
<ContentWrap>
6666
<el-table v-loading="loading" :data="list">
67-
<el-table-column label="应用编号" align="center" prop="id" />
68-
<el-table-column label="应用名" align="center" prop="name" />
67+
<el-table-column label="应用标识" align="center" prop="appKey" />
68+
<el-table-column label="应用名" align="center" prop="name" min-width="90" />
6969
<el-table-column label="开启状态" align="center" prop="status">
7070
<template #default="scope">
7171
<el-switch
@@ -78,7 +78,7 @@
7878
</el-table-column>
7979
<el-table-column label="支付宝配置" align="center">
8080
<el-table-column
81-
:label="channel.name"
81+
:label="channel.name.replace('支付宝', '')"
8282
align="center"
8383
v-for="channel in alipayChannels"
8484
:key="channel.code"
@@ -89,13 +89,15 @@
8989
v-if="isChannelExists(scope.row.channelCodes, channel.code)"
9090
@click="openChannelForm(scope.row, channel.code)"
9191
circle
92+
size="small"
9293
>
9394
<Icon icon="ep:check" />
9495
</el-button>
9596
<el-button
9697
v-else
9798
type="danger"
9899
circle
100+
size="small"
99101
@click="openChannelForm(scope.row, channel.code)"
100102
>
101103
<Icon icon="ep:close" />
@@ -105,7 +107,7 @@
105107
</el-table-column>
106108
<el-table-column label="微信配置" align="center">
107109
<el-table-column
108-
:label="channel.name"
110+
:label="channel.name.replace('微信', '')"
109111
align="center"
110112
v-for="channel in wxChannels"
111113
:key="channel.code"
@@ -116,13 +118,15 @@
116118
v-if="isChannelExists(scope.row.channelCodes, channel.code)"
117119
@click="openChannelForm(scope.row, channel.code)"
118120
circle
121+
size="small"
119122
>
120123
<Icon icon="ep:check" />
121124
</el-button>
122125
<el-button
123126
v-else
124127
type="danger"
125128
circle
129+
size="small"
126130
@click="openChannelForm(scope.row, channel.code)"
127131
>
128132
<Icon icon="ep:close" />
@@ -136,6 +140,7 @@
136140
<el-button
137141
type="success"
138142
circle
143+
size="small"
139144
v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.WALLET.code)"
140145
@click="openChannelForm(scope.row, PayChannelEnum.WALLET.code)"
141146
>
@@ -145,6 +150,7 @@
145150
v-else
146151
type="danger"
147152
circle
153+
size="small"
148154
@click="openChannelForm(scope.row, PayChannelEnum.WALLET.code)"
149155
>
150156
<Icon icon="ep:close" />
@@ -158,6 +164,7 @@
158164
<el-button
159165
type="success"
160166
circle
167+
size="small"
161168
v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.MOCK.code)"
162169
@click="openChannelForm(scope.row, PayChannelEnum.MOCK.code)"
163170
>
@@ -167,6 +174,7 @@
167174
v-else
168175
type="danger"
169176
circle
177+
size="small"
170178
@click="openChannelForm(scope.row, PayChannelEnum.MOCK.code)"
171179
>
172180
<Icon icon="ep:close" />
@@ -255,7 +263,7 @@ const wxChannels = [
255263
PayChannelEnum.WX_APP,
256264
PayChannelEnum.WX_NATIVE,
257265
PayChannelEnum.WX_WAP,
258-
PayChannelEnum.WX_BAR,
266+
PayChannelEnum.WX_BAR
259267
]
260268
261269
/** 查询列表 */

0 commit comments

Comments
 (0)