From d85d0ace9ddce94fc88332d438d6eef0ea221297 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Wed, 13 Nov 2024 15:12:21 +0800 Subject: [PATCH 1/6] finish md241024 --- src/pages.json | 2 +- .../wallet/pages/douyin_withdraw/apply.vue | 32 ++++-- .../wallet/pages/douyin_withdraw/index.vue | 81 +++++++------- .../douyin_withdraw/modules/platform_item.vue | 117 +++++++++++++++++++++ .../wallet/pages/douyin_withdraw/record.vue | 5 + src/subpackage/wallet/pages/index/index.vue | 5 +- .../wallet/pages/index/modules/wallet_info.vue | 5 +- 7 files changed, 192 insertions(+), 55 deletions(-) create mode 100644 src/subpackage/wallet/pages/douyin_withdraw/modules/platform_item.vue diff --git a/src/pages.json b/src/pages.json index 5dcf150..cc0c952 100644 --- a/src/pages.json +++ b/src/pages.json @@ -749,7 +749,7 @@ { "path": "pages/douyin_withdraw/index", "style" : { - "navigationBarTitleText": "抖音提现" + "navigationBarTitleText": "平台提现" } }, { diff --git a/src/subpackage/wallet/pages/douyin_withdraw/apply.vue b/src/subpackage/wallet/pages/douyin_withdraw/apply.vue index f6a84ce..88bb058 100644 --- a/src/subpackage/wallet/pages/douyin_withdraw/apply.vue +++ b/src/subpackage/wallet/pages/douyin_withdraw/apply.vue @@ -83,13 +83,22 @@ export default { bank_name: '', bank_address: '', mobile: '' - } + }, + // md【241024】 241113新增 + source: '', // 提现源:0抖音;1微信 } }, async onLoad(options){ let _bid = options.brand_id || ''; this.brand_id = _bid; - await this.getDouyinWalletBalance(_bid); + + // md【241024】 241113新增 + let { source } = options; + if(![ 0, 1 ].includes(+source))return showNone('缺少参数 source'); + this.source = +source; + + await this.getDouyinWalletBalance(_bid, +source); + if(this.isEmptyInfo())this.getStorageAndSet(); }, methods: { @@ -144,8 +153,10 @@ export default { }, // 提现申请确认 dyConfirmExtract(e){ + let { brand_id, source } = this; this.douyinWalletExtract({ - brand_id: this.brand_id, + brand_id, + source, ...e, }) }, @@ -186,7 +197,7 @@ export default { * http://api.ouxuan.net:61080/project/11/interface/api/2195 * @param {String} brand_id 品牌id * */ - getDouyinWalletBalance(brand_id){ + getDouyinWalletBalance(brand_id, source){ showLoad(); return servers.get({ url: WALLET_API.withdrawalOfDouyinOrg_totalAmount, @@ -196,8 +207,11 @@ export default { failMsg: '获取钱包余额失败' }) .then(res=>{ + hideLoad(); - let _balance = +res.total_amount ?? 0; + let _balance = 0; + if(source === 0)_balance = +res.total_amount_of_douyin ?? 0; + if(source === 1)_balance = +res.total_amount_of_wechat ?? 0; return this.balance = _balance * 0.01; }) .catch(hideLoad) @@ -212,6 +226,8 @@ export default { * @param {String} bank_address // 银行地址 * @param {String} mobile 手机号 * @param {Number} status // 0未处理,1已处理 + * md【241024】 241113新增 + * @param {Number} source // 提现源:0抖音;1微信 * */ douyinWalletExtract({ brand_id, @@ -221,7 +237,8 @@ export default { bank_name, bank_address, mobile, - status = 0 + status = 0, + source }){ showLoad(); servers.post({ @@ -235,6 +252,7 @@ export default { bank_address, mobile, status, + source }, failMsg: '申请提现失败' }) @@ -242,7 +260,7 @@ export default { hideLoad(); this.$refs.walletModalSuccess.alert(); setTimeout(_=>{ - this.getDouyinWalletBalance(brand_id); + this.getDouyinWalletBalance(brand_id, source); }, 1200); }) .catch(hideLoad) diff --git a/src/subpackage/wallet/pages/douyin_withdraw/index.vue b/src/subpackage/wallet/pages/douyin_withdraw/index.vue index a5ec2cc..9c3665a 100644 --- a/src/subpackage/wallet/pages/douyin_withdraw/index.vue +++ b/src/subpackage/wallet/pages/douyin_withdraw/index.vue @@ -1,11 +1,21 @@