From 55a961e86265a1c2b37874dfd076b60935de6964 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 29 Oct 2023 23:48:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E8=B4=A6=20-=20=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=96=B0=E5=A2=9E=E8=BD=AC=E8=B4=A6=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pay/demo/transfer/index.ts | 25 +++ src/api/pay/transfer/index.ts | 18 +++ src/utils/dict.ts | 2 + src/views/pay/demo/{ => order}/index.vue | 0 .../pay/demo/transfer/DemoTransferForm.vue | 122 ++++++++++++++ src/views/pay/demo/transfer/index.vue | 152 ++++++++++++++++++ src/views/pay/transfer/CreatePayTransfer.vue | 141 ++++++++++++++++ .../WalletRechargePackageForm.vue | 2 +- 8 files changed, 461 insertions(+), 1 deletion(-) create mode 100644 src/api/pay/demo/transfer/index.ts create mode 100644 src/api/pay/transfer/index.ts rename src/views/pay/demo/{ => order}/index.vue (100%) create mode 100644 src/views/pay/demo/transfer/DemoTransferForm.vue create mode 100644 src/views/pay/demo/transfer/index.vue create mode 100644 src/views/pay/transfer/CreatePayTransfer.vue diff --git a/src/api/pay/demo/transfer/index.ts b/src/api/pay/demo/transfer/index.ts new file mode 100644 index 00000000..a95b0d5c --- /dev/null +++ b/src/api/pay/demo/transfer/index.ts @@ -0,0 +1,25 @@ +import request from '@/config/axios' + +export interface DemoTransferVO { + price: number + type: number + userName: string + alipayLogonId: string + openid: string +} + +// 创建示例转账单 +export function createDemoTransfer(data: DemoTransferVO) { + return request.post({ + url: '/pay/demo-transfer/create', + data: data + }) +} + +// 获得示例订单分页 +export function getDemoTransferPage(query: PageParam) { + return request.get({ + url: '/pay/demo-transfer/page', + params: query + }) +} diff --git a/src/api/pay/transfer/index.ts b/src/api/pay/transfer/index.ts new file mode 100644 index 00000000..4b2f3154 --- /dev/null +++ b/src/api/pay/transfer/index.ts @@ -0,0 +1,18 @@ +import request from '@/config/axios' + +export interface TransferVO { + appId: number + channelCode: string + merchantTransferId: string + type: number + price: number + subject: string + userName: string + alipayLogonId: string + openid: string +} + +// 新增转账单 +export const createTransfer = async (data: TransferVO) => { + return await request.post({ url: `/pay/transfer/create`, data }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 489d8e4b..12d01507 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -143,6 +143,8 @@ export enum DICT_TYPE { PAY_REFUND_STATUS = 'pay_refund_status', // 退款订单状态 PAY_NOTIFY_STATUS = 'pay_notify_status', // 商户支付回调状态 PAY_NOTIFY_TYPE = 'pay_notify_type', // 商户支付回调状态 + PAY_TRANSFER_STATUS = 'pay_transfer_status', // 转账订单状态 + PAY_TRANSFER_TYPE = 'pay_transfer_type', // 转账订单状态 // ========== MP 模块 ========== MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型 diff --git a/src/views/pay/demo/index.vue b/src/views/pay/demo/order/index.vue similarity index 100% rename from src/views/pay/demo/index.vue rename to src/views/pay/demo/order/index.vue diff --git a/src/views/pay/demo/transfer/DemoTransferForm.vue b/src/views/pay/demo/transfer/DemoTransferForm.vue new file mode 100644 index 00000000..e5448f10 --- /dev/null +++ b/src/views/pay/demo/transfer/DemoTransferForm.vue @@ -0,0 +1,122 @@ + + diff --git a/src/views/pay/demo/transfer/index.vue b/src/views/pay/demo/transfer/index.vue new file mode 100644 index 00000000..7d0d8bad --- /dev/null +++ b/src/views/pay/demo/transfer/index.vue @@ -0,0 +1,152 @@ + + + diff --git a/src/views/pay/transfer/CreatePayTransfer.vue b/src/views/pay/transfer/CreatePayTransfer.vue new file mode 100644 index 00000000..5f0ea166 --- /dev/null +++ b/src/views/pay/transfer/CreatePayTransfer.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/src/views/pay/wallet/rechargePackage/WalletRechargePackageForm.vue b/src/views/pay/wallet/rechargePackage/WalletRechargePackageForm.vue index f538b78c..0153225e 100644 --- a/src/views/pay/wallet/rechargePackage/WalletRechargePackageForm.vue +++ b/src/views/pay/wallet/rechargePackage/WalletRechargePackageForm.vue @@ -90,7 +90,7 @@ const submitForm = async () => { // 提交请求 formLoading.value = true try { - const data = formData.value as unknown as WalletRechargePackageApi.WalletRechargePackageVO + const data = { ...formData.value } data.payPrice = yuanToFen(data.payPrice) data.bonusPrice = yuanToFen(data.bonusPrice) if (formType.value === 'create') {