From e2f3c852a94834d521e248792cc442ee29967f5a Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Sat, 9 Sep 2023 19:42:44 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=90=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
subpkg/withdrawDeposit/company.vue | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/subpkg/withdrawDeposit/company.vue b/subpkg/withdrawDeposit/company.vue
index 18a36f3..13af8a2 100644
--- a/subpkg/withdrawDeposit/company.vue
+++ b/subpkg/withdrawDeposit/company.vue
@@ -11,14 +11,14 @@
可提现金额
- {{company_money||'0.00'}}元
+ {{payMoney.money}}元
提示
- 可提现金额是公司再2023-07-01-至2023-08-15日期间内的收益总和,并不是当前公司收益金额,提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待
+ 请于{{payMoney.end_cycle}}前提现,可提现金额是每一个提现周期内的收益,并不是当前公司收益金额,提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待
@@ -40,7 +40,8 @@
changeMoney: -1,
company_money: "0.00",
payMoney: {
- money: ''
+ money: '0.00',
+ end_cycle: '',
},
payTimer: null,
timeCount: 5,
@@ -80,15 +81,15 @@
else if (this.priceList[index] == '全部') this.payMoney.money = this.$store.state.app.userInfo.user_money || 0;
else this.payMoney.money = this.priceList[index].split('元')[0];
},
+ // 获取可提现的数据
async loadWithddrawInfo(){
let res = await getCurrCycleWithdraw();
- console.log(res);
+ this.payMoney.money = res.data.user_currrent_total_withdraw_money;
+ res.data.end_cycle ? this.payMoney.end_cycle = uni.$u.timeFormat(res.data.end_cycle, 'yyyy-mm-dd') : this.payMoney.end_cycle||'';
},
// 提现
pay() {
- if (!this.payMoney.money) return Toast('请先填写提现金额!')
if (+this.payMoney.money <= 0) return Toast('提现金额不能小于0!')
- if (+this.payMoney.money > +this.$store.state.app.userInfo.user_money) return Toast('提现金额不能大于余额!')
if (!this.payTimer) {
this.goApply();
this.payTimer = setInterval(() => {
@@ -104,17 +105,13 @@
// 提现
async goApply() {
let res = await userWithdraw({
- amount: this.payMoney.money
+ amount: this.payMoney.money,
+ transfer_end_cycel: Date.now()
});
uni.showToast({
icon:'success',
title: res.msg
})
- // 重新显示余额
- let info = this.$store.state.app.userInfo;
- this.payMoney.money = '';
- info.user_money = (info.user_money - this.payMoney.money).toFixed(2);
- this.$store.commit('setUserInfo', info);
}
},
onPullDownRefresh() {