From 323417b0d4afac0aa6aede6aae3c5d865efa47cb Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 3 Aug 2023 23:07:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=94=AF=E4=BB=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86/=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 --- src/api/pay/channel/index.ts | 6 +- src/utils/constants.ts | 7 +- .../pay/app/{ => components}/AppForm.vue | 21 +- .../pay/app/components/alipayChannelForm.vue | 315 ++++++++++++++++ .../pay/app/components/mockChannelForm.vue | 130 +++++++ .../pay/app/components/weixinChannelForm.vue | 343 ++++++++++++++++++ src/views/pay/app/index.vue | 180 +++++---- src/views/pay/order/index.vue | 2 +- 8 files changed, 889 insertions(+), 115 deletions(-) rename src/views/pay/app/{ => components}/AppForm.vue (85%) 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 b030357e..0f4ff424 100644 --- a/src/api/pay/channel/index.ts +++ b/src/api/pay/channel/index.ts @@ -7,7 +7,6 @@ export interface ChannelVO { status: number remark: string feeRate: number - merchantId: number appId: number createTime: Date } @@ -18,13 +17,12 @@ export const getChannelPage = (params: PageParam) => { } // 查询详情支付渠道 -export const getChannel = (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 }) } // 新增支付渠道 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/AppForm.vue b/src/views/pay/app/components/AppForm.vue similarity index 85% rename from src/views/pay/app/AppForm.vue rename to src/views/pay/app/components/AppForm.vue index 6b96f58f..4277fb62 100644 --- a/src/views/pay/app/AppForm.vue +++ b/src/views/pay/app/components/AppForm.vue @@ -10,16 +10,6 @@ - - - - - + 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 5945c499..023b13da 100644 --- a/src/views/pay/app/index.vue +++ b/src/views/pay/app/index.vue @@ -17,15 +17,6 @@ class="!w-240px" /> - - - - 搜索 - 重置 + 搜索 + 重置 - - + + + + +