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 @@ + + + + + + + + {{ dict.label }} + + + + + + + + + 取消 + 确定 + + + + + 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 @@ + + + + + + + % + + + + + + + + + + + + {{ dict.label }} + + + + + + v2 + v3 + + + + + + + + + + + + 点击上传 + + + + + + + + + + + + + 点击上传 + + + + + + + + 点击上传 + + + + + + + + + 取消 + 确定 + + + + + 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" /> - - - - 搜索 - 重置 + 搜索 + 重置 - + - @@ -104,9 +97,7 @@ v-else type="danger" circle - @click=" - handleCreateChannel(scope.row, PayChannelEnum.ALIPAY_APP.code, PayType.ALIPAY) - " + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_APP.code, PayType.ALIPAY)" > @@ -118,7 +109,7 @@ type="success" circle v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.ALIPAY_PC.code)" - @click="handleUpdateChannel(scope.row, PayChannelEnum.ALIPAY_PC.code, PayType.ALIPAY)" + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_PC.code, PayType.ALIPAY)" > @@ -126,7 +117,7 @@ v-else type="danger" circle - @click="handleCreateChannel(scope.row, PayChannelEnum.ALIPAY_PC.code, PayType.ALIPAY)" + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_PC.code, PayType.ALIPAY)" > @@ -138,9 +129,7 @@ type="success" circle v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.ALIPAY_WAP.code)" - @click=" - handleUpdateChannel(scope.row, PayChannelEnum.ALIPAY_WAP.code, PayType.ALIPAY) - " + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_WAP.code, PayType.ALIPAY)" > @@ -148,9 +137,7 @@ v-else type="danger" circle - @click=" - handleCreateChannel(scope.row, PayChannelEnum.ALIPAY_WAP.code, PayType.ALIPAY) - " + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_WAP.code, PayType.ALIPAY)" > @@ -162,7 +149,7 @@ type="success" circle v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.ALIPAY_QR.code)" - @click="handleUpdateChannel(scope.row, PayChannelEnum.ALIPAY_QR.code, PayType.ALIPAY)" + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_QR.code, PayType.ALIPAY)" > @@ -170,7 +157,7 @@ v-else type="danger" circle - @click="handleCreateChannel(scope.row, PayChannelEnum.ALIPAY_QR.code, PayType.ALIPAY)" + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_QR.code, PayType.ALIPAY)" > @@ -182,9 +169,7 @@ type="success" circle v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.ALIPAY_BAR.code)" - @click=" - handleUpdateChannel(scope.row, PayChannelEnum.ALIPAY_BAR.code, PayType.ALIPAY) - " + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_BAR.code, PayType.ALIPAY)" > @@ -192,9 +177,7 @@ v-else type="danger" circle - @click=" - handleCreateChannel(scope.row, PayChannelEnum.ALIPAY_BAR.code, PayType.ALIPAY) - " + @click="openChannelForm(scope.row, PayChannelEnum.ALIPAY_BAR.code, PayType.ALIPAY)" > @@ -208,7 +191,7 @@ type="success" circle v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.WX_LITE.code)" - @click="handleUpdateChannel(scope.row, PayChannelEnum.WX_LITE.code, PayType.WECHAT)" + @click="openChannelForm(scope.row, PayChannelEnum.WX_LITE.code, PayType.WECHAT)" > @@ -216,7 +199,7 @@ v-else type="danger" circle - @click="handleCreateChannel(scope.row, PayChannelEnum.WX_LITE.code, PayType.WECHAT)" + @click="openChannelForm(scope.row, PayChannelEnum.WX_LITE.code, PayType.WECHAT)" > @@ -228,7 +211,7 @@ type="success" circle v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.WX_PUB.code)" - @click="handleUpdateChannel(scope.row, PayChannelEnum.WX_PUB.code, PayType.WECHAT)" + @click="openChannelForm(scope.row, PayChannelEnum.WX_PUB.code, PayType.WECHAT)" > @@ -236,7 +219,7 @@ v-else type="danger" circle - @click="handleCreateChannel(scope.row, PayChannelEnum.WX_PUB.code, PayType.WECHAT)" + @click="openChannelForm(scope.row, PayChannelEnum.WX_PUB.code, PayType.WECHAT)" > @@ -248,7 +231,7 @@ type="success" circle v-if="isChannelExists(scope.row.channelCodes, PayChannelEnum.WX_APP.code)" - @click="handleUpdateChannel(scope.row, PayChannelEnum.WX_APP.code, PayType.WECHAT)" + @click="openChannelForm(scope.row, PayChannelEnum.WX_APP.code, PayType.WECHAT)" > @@ -256,20 +239,33 @@ v-else type="danger" circle - @click="handleCreateChannel(scope.row, PayChannelEnum.WX_APP.code, PayType.WECHAT)" + @click="openChannelForm(scope.row, PayChannelEnum.WX_APP.code, PayType.WECHAT)" > - + + + + + + + + + + +