From 29d61beb1113605a6890844ae40fc14e77ca233a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 21 Jul 2023 13:49:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?mall=20+=20pay=EF=BC=9A=201.=20=E7=AE=80?= =?UTF-8?q?=E5=8C=96=E6=94=AF=E4=BB=98=E5=AE=9D=E6=94=AF=E4=BB=98=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pay/app/components/aliPayChannelForm.vue | 289 ------------------ .../pay/app/components/alipayChannelForm.vue | 268 ++++++++++++++++ yudao-ui-admin/src/views/pay/app/index.vue | 25 +- 3 files changed, 276 insertions(+), 306 deletions(-) delete mode 100644 yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue create mode 100644 yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue diff --git a/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue deleted file mode 100644 index 76b047490..000000000 --- a/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue +++ /dev/null @@ -1,289 +0,0 @@ - - - diff --git a/yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue new file mode 100644 index 000000000..1043c414a --- /dev/null +++ b/yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue @@ -0,0 +1,268 @@ + + + diff --git a/yudao-ui-admin/src/views/pay/app/index.vue b/yudao-ui-admin/src/views/pay/app/index.vue index d280321a3..3a038f8be 100644 --- a/yudao-ui-admin/src/views/pay/app/index.vue +++ b/yudao-ui-admin/src/views/pay/app/index.vue @@ -216,7 +216,7 @@ - + @@ -225,13 +225,13 @@ import { createApp, updateApp, changeAppStatus, deleteApp, getApp, getAppPage } import { DICT_TYPE, getDictDatas } from "@/utils/dict"; import { PayType, PayChannelEnum, CommonStatusEnum } from "@/utils/constants"; import wechatChannelForm from "@/views/pay/app/components/wechatChannelForm"; -import aliPayChannelForm from "@/views/pay/app/components/aliPayChannelForm"; +import alipayChannelForm from "@/views/pay/app/components/alipayChannelForm"; export default { name: "PayApp", components: { "wechatChannelForm": wechatChannelForm, - "aliPayChannelForm": aliPayChannelForm + "alipayChannelForm": alipayChannelForm }, data() { return { @@ -285,13 +285,6 @@ export default { "appId": null, // 渠道编码 "payCode": null, - // 商户对象 - "payMerchant": { - // 编号 - "id": null, - // 名称 - "name": null - }, } }; }, @@ -426,14 +419,12 @@ export default { this.channelParam.aliPayOpen = false; } if (type === PayType.ALIPAY) { - this.channelParam.aliPayOpen = true; - this.channelParam.wechatOpen = false; + console.log(this.$refs['alipayChannelFormRef']) + this.$refs['alipayChannelFormRef'].open(row.id, payCode); + return; + // this.channelParam.aliPayOpen = true; + // this.channelParam.wechatOpen = false; } - this.channelParam.edit = false; - this.channelParam.loading = false; - this.channelParam.appId = row.id; - this.channelParam.payCode = payCode; - this.channelParam.payMerchant = row.payMerchant; }, /** * 根据渠道编码判断渠道列表中是否存在 From f92a5899f3bb9e7ee53cc002a10909467b31f5e8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 21 Jul 2023 21:50:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?mall=20+=20pay=EF=BC=9A=201.=20=E7=AE=80?= =?UTF-8?q?=E5=8C=96=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/src/utils/constants.js | 8 - .../pay/app/components/alipayChannelForm.vue | 9 +- .../pay/app/components/wechatChannelForm.vue | 328 ------------------ .../pay/app/components/weixinChannelForm.vue | 257 ++++++++++++++ yudao-ui-admin/src/views/pay/app/index.vue | 167 ++++----- 5 files changed, 318 insertions(+), 451 deletions(-) delete mode 100644 yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue create mode 100644 yudao-ui-admin/src/views/pay/app/components/weixinChannelForm.vue diff --git a/yudao-ui-admin/src/utils/constants.js b/yudao-ui-admin/src/utils/constants.js index 70e0f5a02..a4805096d 100644 --- a/yudao-ui-admin/src/utils/constants.js +++ b/yudao-ui-admin/src/utils/constants.js @@ -180,14 +180,6 @@ export const PayDisplayModeEnum = { } } -/** - * 支付类型枚举 - */ -export const PayType = { - WECHAT: "WECHAT", - ALIPAY: "ALIPAY" -} - /** * 支付订单状态枚举 */ diff --git a/yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue index 1043c414a..cb67b9d76 100644 --- a/yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue +++ b/yudao-ui-admin/src/views/pay/app/components/alipayChannelForm.vue @@ -172,7 +172,7 @@ export default { this.formData = response.data; this.formData.config = JSON.parse(response.data.config); } - this.title = this.formData.id ? '创建支付渠道' : '编辑支付渠道' + this.title = !this.formData.id ? '创建支付渠道' : '编辑支付渠道' }).finally(() => { this.formLoading = false; }); @@ -257,12 +257,7 @@ export default { this.formData.config.rootCertContent = e.target.result } readFile.readAsText(event.file); - }, - + } } } - - diff --git a/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue deleted file mode 100644 index c3e691f9f..000000000 --- a/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue +++ /dev/null @@ -1,328 +0,0 @@ - - - diff --git a/yudao-ui-admin/src/views/pay/app/components/weixinChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/weixinChannelForm.vue new file mode 100644 index 000000000..00e0773b5 --- /dev/null +++ b/yudao-ui-admin/src/views/pay/app/components/weixinChannelForm.vue @@ -0,0 +1,257 @@ + + diff --git a/yudao-ui-admin/src/views/pay/app/index.vue b/yudao-ui-admin/src/views/pay/app/index.vue index 3a038f8be..be92e0dae 100644 --- a/yudao-ui-admin/src/views/pay/app/index.vue +++ b/yudao-ui-admin/src/views/pay/app/index.vue @@ -9,7 +9,7 @@ - @@ -48,60 +48,55 @@ @@ -110,60 +105,55 @@ @@ -191,7 +181,7 @@ - + {{ dict.label }} @@ -214,24 +204,23 @@ - - + +