更新提现

This commit is contained in:
weipengfei 2023-09-09 19:42:44 +08:00
parent 42f2d5ffe7
commit e2f3c852a9

View File

@ -11,14 +11,14 @@
</view> </view>
<view class="item"> <view class="item">
<text>可提现金额</text> <text>可提现金额</text>
<text>{{company_money||'0.00'}}</text> <text>{{payMoney.money}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="tip"> <view class="tip">
<view class="title">提示</view> <view class="title">提示</view>
<view class="text"> <view class="text">
可提现金额是公司再2023-07-01-至2023-08-15日期间内的收益总和,并不是当前公司收益金额,提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待 请于{{payMoney.end_cycle}}前提现,可提现金额是每一个提现周期内的收益,并不是当前公司收益金额,提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待
<!-- <text @click="copyPhone('4008888888')">4008888888</text> --> <!-- <text @click="copyPhone('4008888888')">4008888888</text> -->
</view> </view>
</view> </view>
@ -40,7 +40,8 @@
changeMoney: -1, changeMoney: -1,
company_money: "0.00", company_money: "0.00",
payMoney: { payMoney: {
money: '' money: '0.00',
end_cycle: '',
}, },
payTimer: null, payTimer: null,
timeCount: 5, timeCount: 5,
@ -80,15 +81,15 @@
else if (this.priceList[index] == '全部') this.payMoney.money = this.$store.state.app.userInfo.user_money || 0; 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]; else this.payMoney.money = this.priceList[index].split('元')[0];
}, },
//
async loadWithddrawInfo(){ async loadWithddrawInfo(){
let res = await getCurrCycleWithdraw(); 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() { pay() {
if (!this.payMoney.money) return Toast('请先填写提现金额!')
if (+this.payMoney.money <= 0) return Toast('提现金额不能小于0!') if (+this.payMoney.money <= 0) return Toast('提现金额不能小于0!')
if (+this.payMoney.money > +this.$store.state.app.userInfo.user_money) return Toast('提现金额不能大于余额!')
if (!this.payTimer) { if (!this.payTimer) {
this.goApply(); this.goApply();
this.payTimer = setInterval(() => { this.payTimer = setInterval(() => {
@ -104,17 +105,13 @@
// //
async goApply() { async goApply() {
let res = await userWithdraw({ let res = await userWithdraw({
amount: this.payMoney.money amount: this.payMoney.money,
transfer_end_cycel: Date.now()
}); });
uni.showToast({ uni.showToast({
icon:'success', icon:'success',
title: res.msg 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() { onPullDownRefresh() {