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 @@ - +