【修复】修复提现二次扣除手续费的问题,同时优化相关提示。

This commit is contained in:
jianweie
2024-05-15 23:55:00 +08:00
parent 481518b474
commit ad53da6d99
4 changed files with 36 additions and 13 deletions

View File

@@ -44,9 +44,6 @@
<p>
2充值一经办理概不退款
</p>
<p>
3充值金额将无法用于提现;
</p>
</view>
<!--按钮-->

View File

@@ -10,7 +10,7 @@
<view slot="right">
</view>
</u-navbar>
<view class="content" v-if="isAllowWithdrawCash">
<view class="content coreshop-bg-white" v-if="isAllowWithdrawCash">
<view class="coreshop-tabbar-height">
<!-- 我的银行卡信息 -->
<view class="coreshop-list menu sm-border margin-top" v-if="userbankCard" @click="toBankCardList">
@@ -43,11 +43,26 @@
</view>
<view class='coreshop-cell-item'>
<view class='coreshop-cell-item-bd'>
<view class='coreshop-text-grey' v-show="!isError">可用余额 {{ user.balance}} </view>
<view class='coreshop-text-grey' v-show="!isError">可用余额 {{ user.balance}} 扣除手续费最高可提现{{maxMoney}}</view>
<view class='coreshop-text-red' v-show="isError">提现金额超过可用余额</view>
</view>
</view>
</view>
<view class="coreshop-font-13 coreshop-line-height-22 coreshop-margin-top-40 coreshop-margin-10 coreshop-padding-10">
<p>
提现须知
</p>
<p>
1提现金额加提现服务费需超过或等于余额
</p>
<p>
2充值一经办理概不退款
</p>
</view>
</view>
<view class="coreshop-bg-white coreshop-footer-fixed coreshop-foot-padding-bottom">
<u-button size="normal" type="success" v-if="isSubmit" @click="toCash" :disabled='submitStatus' :loading='submitStatus'>确认提现</u-button>
@@ -75,7 +90,8 @@
isError: false, // 当提现金额大于可用余额 显示错误提示
isSubmit: false, // 提现点击
money: '', // 用户输入的提现金额
submitStatus: false
submitStatus: false,
maxMoney: 0,
}
},
onLoad() {
@@ -137,8 +153,11 @@
// 获取我的余额信息
// 获取用户的可用余额
this.$u.api.userInfo().then(res => {
this.user = res.data
console.log(this.user);
this.user = res.data;
//this.maxMoney = Math.floor(this.user.balance).toFixed(2) - Math.floor(this.user.balance * this.tocashMoneyRate / 100).toFixed(2) * 100 / 100;
this.maxMoney = (this.user.balance.toFixed(2) - (this.user.balance.toFixed(2) * (this.tocashMoneyRate / 100)).toFixed(2)).toFixed(2);
//console.log(this.user);
})
},
// 去提现
@@ -192,7 +211,11 @@
} else if (Number(this.money) < Number(this.tocashMoneyLow)) {
this.isError = false
this.isSubmit = false
} else {
} else if (Number(this.money) > Number(this.maxMoney)) {
this.isError = true
this.isSubmit = false
}
else {
this.isError = false
this.isSubmit = true
}