更新提现
This commit is contained in:
parent
42f2d5ffe7
commit
e2f3c852a9
@ -11,14 +11,14 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>可提现金额</text>
|
||||
<text>{{company_money||'0.00'}}元</text>
|
||||
<text>{{payMoney.money}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tip">
|
||||
<view class="title">提示</view>
|
||||
<view class="text">
|
||||
可提现金额是公司再2023-07-01-至2023-08-15日期间内的收益总和,并不是当前公司收益金额,提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待
|
||||
请于{{payMoney.end_cycle}}前提现,可提现金额是每一个提现周期内的收益,并不是当前公司收益金额,提现后将会由后台审核,审核通过后会直接往您所上传的银行卡汇款,请耐心等待
|
||||
<!-- <text @click="copyPhone('4008888888')">4008888888</text> -->
|
||||
</view>
|
||||
</view>
|
||||
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user