From 82516a56af33eaa57b9828063846c81645905bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Sat, 18 Mar 2023 14:08:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=8E=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/apis.js | 13 +++++++++ src/core/models/user.js | 33 ++++++++++++++++++++++ src/pages/member/cash-withdraw.vue | 45 +++++++++++++++++++++++++----- 3 files changed, 84 insertions(+), 7 deletions(-) diff --git a/src/core/apis.js b/src/core/apis.js index 90e5643..c7b1171 100644 --- a/src/core/apis.js +++ b/src/core/apis.js @@ -28,12 +28,25 @@ const apis = { }, info: { url: "/user/workerinfo/getuserinfo", + showLoading: true, auth: true, }, setServiceInfo: { url: "/user/workerinfo/setinfo", auth: true, }, + withdraw: { + withdraw: { + url: "/user/workerinfo/drawmoney", + showLoading: true, + auth: true, + }, + explain: { + url: "/wxapp/index/getdistributionmoney", + showLoading: true, + auth: true, + } + } }, service: { cate: { diff --git a/src/core/models/user.js b/src/core/models/user.js index 5d82658..d242212 100644 --- a/src/core/models/user.js +++ b/src/core/models/user.js @@ -247,5 +247,38 @@ export default { prototype.$utils.toast('注销成功').then(() => { prototype.$utils.toPage('/pages/index/index', {}, 'switch'); }); + }, + /** + * 提现 + */ + withdraw(money) { + return new Promise((resolve, reject) => { + prototype.$request({ + api: "user.withdraw.withdraw", + data: { + money: money + } + }).then(response => { + if (response.code == 1) { + return resolve(response); + } + return reject(response.msg); + }).catch(e => { }); + }); + }, + /** + * 提现说明 + */ + withdrawExplain() { + return new Promise((resolve, reject) => { + prototype.$request({ + api: "user.withdraw.explain", + }).then(response => { + if (response.code == 1) { + return resolve(response.data); + } + return reject(response.msg); + }).catch(e => { }); + }); } } diff --git a/src/pages/member/cash-withdraw.vue b/src/pages/member/cash-withdraw.vue index 631ba3e..0c36844 100644 --- a/src/pages/member/cash-withdraw.vue +++ b/src/pages/member/cash-withdraw.vue @@ -8,46 +8,77 @@ class="input" type="number" v-model="money" - placeholder="请输入提现金额,不可低于20元" + :placeholder="'请输入提现金额,不可低于' + min + '元'" placeholder-class="placeholder-style-4" /> 可提现金额: - ¥0.00 + ¥ {{ balance }} 提现说明 - 1、提现周期为每周三提现一次,2小时内到账 2、请谨慎绑定微信号,信息错误将导致错误打款,责任由师傅自行承担 - 3、家居售后问题通常在用户试用中出现,如漏水、渗水、堵塞、固定松动等,因此平台对服务后订单设置7日反馈期,反馈期内若服务无售后问题,或非安装问题所造成售后,反馈期过后该笔订单金额自动转入可提现余额。 + - 确定提现 + 确定提现