From 86cc1da01b43779c5aca9096e52e88b9aaca9f38 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Sun, 22 Jun 2025 19:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E6=8F=90=E7=8E=B0=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/model/index.js | 5 +++ components/userShop/userShopCommission.vue | 6 +-- config.js | 2 +- pages_order/mine/runningWater.vue | 71 ++++++++++++++++++++++++++++-- 4 files changed, 77 insertions(+), 7 deletions(-) diff --git a/api/model/index.js b/api/model/index.js index 5f0ed8c..89fe2c2 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -162,6 +162,11 @@ const api = { url: '/index/getAddOrderInfo', method: 'GET', }, + // 领取提现 + requestMerchantTransfer: { + url: '/info/requestMerchantTransfer', + method: 'POST', + }, } export default api \ No newline at end of file diff --git a/components/userShop/userShopCommission.vue b/components/userShop/userShopCommission.vue index 24f9fe1..69e21c8 100644 --- a/components/userShop/userShopCommission.vue +++ b/components/userShop/userShopCommission.vue @@ -37,13 +37,13 @@ return { list : [ { - name : '余额记录', + name : '收入记录', }, { - name : '提现记录', + name : '支出记录', }, { - name : '积分记录', + name : '提现记录', }, ], }; diff --git a/config.js b/config.js index 068f8c7..4c91149 100644 --- a/config.js +++ b/config.js @@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools' Vue.use(uvUI); // 当前环境 -const type = 'prod' +const type = 'local' // 环境配置 diff --git a/pages_order/mine/runningWater.vue b/pages_order/mine/runningWater.vue index 8ab9e73..96fe6e8 100644 --- a/pages_order/mine/runningWater.vue +++ b/pages_order/mine/runningWater.vue @@ -40,10 +40,39 @@ - + + + + + + + + + + @@ -74,7 +103,7 @@ year: '', month: '' }, - title: ['余额记录', '提现记录', '积分记录'], + title: ['收入记录', '支出记录'], agentFlow: { total: 1, records: [] @@ -175,7 +204,34 @@ this.queryParams.month = ''; this.queryParams.pageNo = 1; this.getAgentFlow(); - } + }, + requestMerchantTransfer(item) { + if (!wx.canIUse('requestMerchantTransfer')) { + wx.showModal({ + content: '你的微信版本过低,请更新至最新版本。', + showCancel: false, + }); + return + } + wx.requestMerchantTransfer({ + mchId: '1673516176',//万能墙商户号 + appId: wx.getAccountInfoSync().miniProgram.appId, + package: item.packageInfo, + success: (res) => { + // res.err_msg将在页面展示成功后返回应用时返回ok,并不代表提款成功 + console.log('success:', res); + this.getAgentFlow() + + this.$api('requestMerchantTransfer', { + id : item.id, + }) + }, + fail: (res) => { + console.log('fail:', res); + this.getAgentFlow() + }, + }); + }, } } @@ -287,5 +343,14 @@ border-radius: 20rpx; overflow: hidden; } + .uni-color-btn{ + background: $uni-color; + color: #fff; + text-align: center; + margin: 0; + border-radius: 10rpx; + padding: 6px; + font-size: 22rpx; + } } \ No newline at end of file