From 3f479ecffcc0d819eb42bf0189127ba243aadbce Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 3 Aug 2023 23:07:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E4=BB=98=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E4=BF=A1=E6=81=AF(alpha)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 323417b0d4afac0aa6aede6aae3c5d865efa47cb) --- src/api/pay/channel/index.ts | 38 +- src/utils/constants.ts | 7 +- src/views/pay/app/components/AppForm.vue | 130 ++++ .../pay/app/components/alipayChannelForm.vue | 315 ++++++++++ .../pay/app/components/mockChannelForm.vue | 130 ++++ .../pay/app/components/weixinChannelForm.vue | 343 +++++++++++ src/views/pay/app/index.vue | 575 ++++++++++++++---- src/views/pay/order/index.vue | 433 +++++++++---- 8 files changed, 1694 insertions(+), 277 deletions(-) create mode 100644 src/views/pay/app/components/AppForm.vue create mode 100644 src/views/pay/app/components/alipayChannelForm.vue create mode 100644 src/views/pay/app/components/mockChannelForm.vue create mode 100644 src/views/pay/app/components/weixinChannelForm.vue diff --git a/src/api/pay/channel/index.ts b/src/api/pay/channel/index.ts index a6da9eb8..0f4ff424 100644 --- a/src/api/pay/channel/index.ts +++ b/src/api/pay/channel/index.ts @@ -7,64 +7,40 @@ export interface ChannelVO { status: number remark: string feeRate: number - merchantId: number appId: number createTime: Date } -export interface ChannelPageReqVO extends PageParam { - code?: string - status?: number - remark?: string - feeRate?: number - merchantId?: number - appId?: number - config?: string - createTime?: Date[] -} - -export interface ChannelExportReqVO { - code?: string - status?: number - remark?: string - feeRate?: number - merchantId?: number - appId?: number - config?: string - createTime?: Date[] -} - // 查询列表支付渠道 -export const getChannelPageApi = (params: ChannelPageReqVO) => { +export const getChannelPage = (params: PageParam) => { return request.get({ url: '/pay/channel/page', params }) } // 查询详情支付渠道 -export const getChannelApi = (merchantId: number, appId: string, code: string) => { +export const getChannel = (appId: string, code: string) => { const params = { - merchantId: merchantId, appId: appId, code: code } - return request.get({ url: '/pay/channel/get-channel', params: params }) + return request.get({ url: '/pay/channel/get', params: params }) } // 新增支付渠道 -export const createChannelApi = (data: ChannelVO) => { +export const createChannel = (data: ChannelVO) => { return request.post({ url: '/pay/channel/create', data }) } // 修改支付渠道 -export const updateChannelApi = (data: ChannelVO) => { +export const updateChannel = (data: ChannelVO) => { return request.put({ url: '/pay/channel/update', data }) } // 删除支付渠道 -export const deleteChannelApi = (id: number) => { +export const deleteChannel = (id: number) => { return request.delete({ url: '/pay/channel/delete?id=' + id }) } // 导出支付渠道 -export const exportChannelApi = (params: ChannelExportReqVO) => { +export const exportChannel = (params) => { return request.download({ url: '/pay/channel/export-excel', params }) } diff --git a/src/utils/constants.ts b/src/utils/constants.ts index b2914f9e..3a91899a 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -118,6 +118,10 @@ export const PayChannelEnum = { ALIPAY_BAR: { code: 'alipay_bar', name: '支付宝条码支付' + }, + MOCK: { + code: 'mock', + name: '模拟支付' } } @@ -126,7 +130,8 @@ export const PayChannelEnum = { */ export const PayType = { WECHAT: 'WECHAT', - ALIPAY: 'ALIPAY' + ALIPAY: 'ALIPAY', + MOCK: 'MOCK' } /** diff --git a/src/views/pay/app/components/AppForm.vue b/src/views/pay/app/components/AppForm.vue new file mode 100644 index 00000000..4277fb62 --- /dev/null +++ b/src/views/pay/app/components/AppForm.vue @@ -0,0 +1,130 @@ + + + diff --git a/src/views/pay/app/components/alipayChannelForm.vue b/src/views/pay/app/components/alipayChannelForm.vue new file mode 100644 index 00000000..ae96a901 --- /dev/null +++ b/src/views/pay/app/components/alipayChannelForm.vue @@ -0,0 +1,315 @@ + + diff --git a/src/views/pay/app/components/mockChannelForm.vue b/src/views/pay/app/components/mockChannelForm.vue new file mode 100644 index 00000000..8de7f29f --- /dev/null +++ b/src/views/pay/app/components/mockChannelForm.vue @@ -0,0 +1,130 @@ + + diff --git a/src/views/pay/app/components/weixinChannelForm.vue b/src/views/pay/app/components/weixinChannelForm.vue new file mode 100644 index 00000000..343c49c3 --- /dev/null +++ b/src/views/pay/app/components/weixinChannelForm.vue @@ -0,0 +1,343 @@ + + diff --git a/src/views/pay/app/index.vue b/src/views/pay/app/index.vue index 0908f0f5..023b13da 100644 --- a/src/views/pay/app/index.vue +++ b/src/views/pay/app/index.vue @@ -1,155 +1,464 @@ - diff --git a/src/views/pay/order/index.vue b/src/views/pay/order/index.vue index 0e6430fd..7f643ece 100644 --- a/src/views/pay/order/index.vue +++ b/src/views/pay/order/index.vue @@ -1,130 +1,339 @@ - +