Skip to content

Commit 983712b

Browse files
YunaiVgitee-org
authored andcommitted
!542 同步支付中心、商城最新实现
Merge pull request !542 from 芋道源码/feature/mall_product
2 parents 5c0da7a + 1b0064b commit 983712b

File tree

23 files changed

+1262
-1952
lines changed

23 files changed

+1262
-1952
lines changed

src/api/pay/app.js

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import request from '@/utils/request'
22

3-
// 创建支付应用信息
3+
// 创建支付应用
44
export function createApp(data) {
55
return request({
66
url: '/pay/app/create',
@@ -9,7 +9,7 @@ export function createApp(data) {
99
})
1010
}
1111

12-
// 更新支付应用信息
12+
// 更新支付应用
1313
export function updateApp(data) {
1414
return request({
1515
url: '/pay/app/update',
@@ -18,7 +18,7 @@ export function updateApp(data) {
1818
})
1919
}
2020

21-
// 支付应用信息状态修改
21+
// 支付应用状态修改
2222
export function changeAppStatus(id, status) {
2323
const data = {
2424
id,
@@ -31,23 +31,23 @@ export function changeAppStatus(id, status) {
3131
})
3232
}
3333

34-
// 删除支付应用信息
34+
// 删除支付应用
3535
export function deleteApp(id) {
3636
return request({
3737
url: '/pay/app/delete?id=' + id,
3838
method: 'delete'
3939
})
4040
}
4141

42-
// 获得支付应用信息
42+
// 获得支付应用
4343
export function getApp(id) {
4444
return request({
4545
url: '/pay/app/get?id=' + id,
4646
method: 'get'
4747
})
4848
}
4949

50-
// 获得支付应用信息分页
50+
// 获得支付应用分页
5151
export function getAppPage(query) {
5252
return request({
5353
url: '/pay/app/page',
@@ -56,23 +56,10 @@ export function getAppPage(query) {
5656
})
5757
}
5858

59-
// 导出支付应用信息 Excel
60-
export function exportAppExcel(query) {
59+
// 获得支付应用列表
60+
export function getAppList() {
6161
return request({
62-
url: '/pay/app/export-excel',
63-
method: 'get',
64-
params: query,
65-
responseType: 'blob'
66-
})
67-
}
68-
69-
// 根据商ID称搜索应用列表
70-
export function getAppListByMerchantId(merchantId) {
71-
return request({
72-
url: '/pay/app/list-merchant-id',
73-
params:{
74-
merchantId:merchantId
75-
},
62+
url: '/pay/app/list',
7663
method: 'get'
7764
})
7865
}

src/api/pay/channel.js

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,44 +28,14 @@ export function deleteChannel(id) {
2828
}
2929

3030
// 获得支付渠道
31-
// export function getChannel(id) {
32-
// return request({
33-
// url: '/pay/channel/get?id=' + id,
34-
// method: 'get'
35-
// })
36-
// }
37-
38-
39-
40-
// 获得支付渠道分页
41-
export function getChannelPage(query) {
31+
export function getChannel(appId, code) {
4232
return request({
43-
url: '/pay/channel/page',
33+
url: '/pay/channel/get',
4434
method: 'get',
45-
params: query
46-
})
47-
}
48-
49-
// 导出支付渠道Excel
50-
export function exportChannelExcel(query) {
51-
return request({
52-
url: '/pay/channel/export-excel',
53-
method: 'get',
54-
params: query,
55-
responseType: 'blob'
56-
})
57-
}
58-
59-
// 获得支付渠道
60-
export function getChannel(merchantId,appId,code) {
61-
return request({
62-
url: '/pay/channel/get-channel',
6335
params:{
64-
merchantId:merchantId,
65-
appId:appId,
66-
code:code
36+
appId,
37+
code
6738
},
68-
method: 'get'
6939
})
7040
}
7141

src/api/pay/merchant.js

Lines changed: 0 additions & 77 deletions
This file was deleted.

src/api/pay/notify.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import request from '@/utils/request'
2+
3+
// 获得支付通知明细
4+
export function getNotifyTaskDetail(id) {
5+
return request({
6+
url: '/pay/notify/get-detail?id=' + id,
7+
method: 'get'
8+
})
9+
}
10+
11+
// 获得支付通知分页
12+
export function getNotifyTaskPage(query) {
13+
return request({
14+
url: '/pay/notify/page',
15+
method: 'get',
16+
params: query
17+
})
18+
}

src/assets/images/pay/icon/wx_bar.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/plugins/tab.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export default {
3636
return router.push(lastPath || '/');
3737
});
3838
}
39+
if (typeof obj === "function") {
40+
return store.dispatch('tagsView/delView', router.currentRoute).then(obj);
41+
}
3942
return store.dispatch('tagsView/delView', obj);
4043
},
4144
// 关闭所有tab页签

src/router/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ export const constantRoutes = [
227227
component: Layout,
228228
hidden: true,
229229
children: [{
230-
path: 'order/submit',
231-
name: 'PayOrderSubmit',
230+
path: 'cashier',
231+
name: 'PayCashier',
232232
hidden: true,
233233
meta: {
234234
title: '收银台',
235235
noCache: true
236236
},
237-
component: (resolve) => require(['@/views/pay/order/submit'], resolve)
237+
component: (resolve) => require(['@/views/pay/cashier'], resolve)
238238
}]
239239
}
240240
]

src/utils/constants.js

Lines changed: 11 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ export const PayChannelEnum = {
132132
"code": "wx_app",
133133
"name": "微信 APP 支付"
134134
},
135+
WX_NATIVE: {
136+
"code": "wx_native",
137+
"name": "微信扫码支付"
138+
},
139+
WX_BAR: {
140+
"code": "wx_bar",
141+
"name": "微信条码支付"
142+
},
135143
ALIPAY_PC: {
136144
"code": "alipay_pc",
137145
"name": "支付宝 PC 网站支付"
@@ -169,17 +177,12 @@ export const PayDisplayModeEnum = {
169177
},
170178
QR_CODE: {
171179
"mode": "qr_code"
180+
},
181+
APP: {
182+
"mode": "app"
172183
}
173184
}
174185

175-
/**
176-
* 支付类型枚举
177-
*/
178-
export const PayType = {
179-
WECHAT: "WECHAT",
180-
ALIPAY: "ALIPAY"
181-
}
182-
183186
/**
184187
* 支付订单状态枚举
185188
*/
@@ -198,42 +201,6 @@ export const PayOrderStatusEnum = {
198201
}
199202
}
200203

201-
/**
202-
* 支付订单回调状态枚举
203-
*/
204-
export const PayOrderNotifyStatusEnum = {
205-
NO: {
206-
status: 0,
207-
name: '未通知'
208-
},
209-
SUCCESS: {
210-
status: 10,
211-
name: '通知成功'
212-
},
213-
FAILURE: {
214-
status: 20,
215-
name: '通知失败'
216-
}
217-
}
218-
219-
/**
220-
* 支付订单退款状态枚举
221-
*/
222-
export const PayOrderRefundStatusEnum = {
223-
NO: {
224-
status: 0,
225-
name: '未退款'
226-
},
227-
SOME: {
228-
status: 10,
229-
name: '部分退款'
230-
},
231-
ALL: {
232-
status: 20,
233-
name: '全部退款'
234-
}
235-
}
236-
237204
/**
238205
* 支付退款订单状态枚举
239206
*/

src/utils/dict.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,12 @@ export const DICT_TYPE = {
5151

5252
// ========== PAY 模块 ==========
5353
PAY_CHANNEL_WECHAT_VERSION: 'pay_channel_wechat_version', // 微信渠道版本
54-
PAY_CHANNEL_ALIPAY_SIGN_TYPE: 'pay_channel_alipay_sign_type', // 支付渠道支付宝算法类型
55-
PAY_CHANNEL_ALIPAY_MODE: 'pay_channel_alipay_mode', // 支付宝公钥类型
56-
PAY_CHANNEL_ALIPAY_SERVER_TYPE: 'pay_channel_alipay_server_type', // 支付宝网关地址
57-
PAY_CHANNEL_CODE_TYPE: 'pay_channel_code_type', // 支付渠道编码类型
58-
PAY_ORDER_NOTIFY_STATUS: 'pay_order_notify_status', // 商户支付订单回调状态
54+
55+
PAY_CHANNEL_CODE: 'pay_channel_code', // 支付渠道编码类型
5956
PAY_ORDER_STATUS: 'pay_order_status', // 商户支付订单状态
60-
PAY_ORDER_REFUND_STATUS: 'pay_order_refund_status', // 商户支付订单退款状态
61-
PAY_REFUND_ORDER_STATUS: 'pay_refund_order_status', // 退款订单状态
62-
PAY_REFUND_ORDER_TYPE: 'pay_refund_order_type', // 退款订单类别
57+
PAY_REFUND_STATUS: 'pay_refund_status', // 退款订单状态
58+
PAY_NOTIFY_STATUS: 'pay_notify_status', // 商户支付回调状态
59+
PAY_NOTIFY_TYPE: 'pay_notify_type', // 商户支付回调状态
6360

6461
// ========== MP 模块 ==========
6562
MP_AUTO_REPLY_REQUEST_MATCH: 'mp_auto_reply_request_match', // 自动回复请求匹配类型

0 commit comments

Comments
 (0)