feat(withdraw): 提现金额限制100的整数倍,完善全部提现取整与分红规则文案规范
这个提交包含在:
@@ -68,7 +68,7 @@
|
||||
class="ss-flex-1 ss-p-l-10"
|
||||
v-model="state.amount"
|
||||
type="number"
|
||||
placeholder="请输入提现金额"
|
||||
:placeholder="state.walletType === 'madow' ? '请输入提现金额' : '请输入100的整数倍金额(如100、1200)'"
|
||||
/>
|
||||
</view>
|
||||
<view
|
||||
@@ -115,7 +115,7 @@
|
||||
<view class="draw-notice">
|
||||
<view class="title ss-m-b-20">提现说明</view>
|
||||
<view class="tip-banner ss-m-b-20" v-if="state.walletType !== 'madow'" style="background: #fff8f2; color: #ff6000; font-size: 22rpx; padding: 16rpx 20rpx; border-radius: 12rpx; line-height: 1.5;">
|
||||
💡 提示:商城收益分成已全额直接入账商城余额,支持随时申请提现至银行卡/微信/支付宝,也可用于下单直接抵扣。历史存量佣金可转入商城余额消费。
|
||||
💡 提示:提现金额须为100的整数倍(如100、200、1200等)。商城收益分成已全额直接入账商城余额,支持随时申请提现至银行卡/微信/支付宝,也可用于下单直接抵扣。历史存量佣金可转入商城余额消费。
|
||||
</view>
|
||||
<view class="tip-banner ss-m-b-20" v-else style="background: #fdfbf7; color: #b78328; font-size: 22rpx; padding: 16rpx 20rpx; border-radius: 12rpx; line-height: 1.5;">
|
||||
💡 提示:dmepa 按大盘实时汇率折算为现金扣除持仓,提现渠道限定为银行卡转账。审核驳回后对应 dmepa 将全额原路退回。
|
||||
@@ -157,6 +157,7 @@
|
||||
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
|
||||
function filterRules(rules) {
|
||||
let list = [];
|
||||
list.push('单次提现金额须为 100 元的整数倍(如 100、200、1200 等);');
|
||||
let str1 = '';
|
||||
if (rules.min_amount > 0) {
|
||||
str1 += `最少 ${rules.min_amount}元; `;
|
||||
@@ -238,15 +239,25 @@
|
||||
}
|
||||
|
||||
function onWithdrawAllMoney() {
|
||||
if (userInfo.value?.money) {
|
||||
state.amount = String(userInfo.value.money);
|
||||
const total = parseFloat(userInfo.value?.money || 0);
|
||||
const amount = Math.floor(total / 100) * 100;
|
||||
if (amount <= 0) {
|
||||
sheep.$helper.toast('余额满100元方可申请提现');
|
||||
state.amount = '';
|
||||
return;
|
||||
}
|
||||
state.amount = String(amount);
|
||||
}
|
||||
|
||||
function onWithdrawAllCommission() {
|
||||
if (userInfo.value?.commission) {
|
||||
state.amount = String(userInfo.value.commission);
|
||||
const total = parseFloat(userInfo.value?.commission || 0);
|
||||
const amount = Math.floor(total / 100) * 100;
|
||||
if (amount <= 0) {
|
||||
sheep.$helper.toast('佣金满100元方可申请提现');
|
||||
state.amount = '';
|
||||
return;
|
||||
}
|
||||
state.amount = String(amount);
|
||||
}
|
||||
|
||||
async function fetchUserBankAccount() {
|
||||
@@ -330,10 +341,19 @@
|
||||
}
|
||||
} else if (state.walletType === 'commission') {
|
||||
payload.wallet_type = 'commission';
|
||||
if (Number(payload.money) > Number(userInfo.value?.commission || 0) || Number(payload.money) <= 0) {
|
||||
const moneyVal = Number(payload.money);
|
||||
if (isNaN(moneyVal) || moneyVal <= 0) {
|
||||
sheep.$helper.toast('请输入正确的提现金额');
|
||||
return;
|
||||
}
|
||||
if (!Number.isInteger(moneyVal) || moneyVal % 100 !== 0) {
|
||||
sheep.$helper.toast('提现金额须为100的整数倍');
|
||||
return;
|
||||
}
|
||||
if (Number(payload.money) > Number(userInfo.value?.commission || 0)) {
|
||||
sheep.$helper.toast('可提现佣金不足');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!payload.type) {
|
||||
sheep.$helper.toast('请选择提现方式');
|
||||
@@ -341,10 +361,19 @@
|
||||
}
|
||||
} else {
|
||||
payload.wallet_type = 'money';
|
||||
if (Number(payload.money) > Number(userInfo.value?.money || 0) || Number(payload.money) <= 0) {
|
||||
const moneyVal = Number(payload.money);
|
||||
if (isNaN(moneyVal) || moneyVal <= 0) {
|
||||
sheep.$helper.toast('请输入正确的提现金额');
|
||||
return;
|
||||
}
|
||||
if (!Number.isInteger(moneyVal) || moneyVal % 100 !== 0) {
|
||||
sheep.$helper.toast('提现金额须为100的整数倍');
|
||||
return;
|
||||
}
|
||||
if (Number(payload.money) > Number(userInfo.value?.money || 0)) {
|
||||
sheep.$helper.toast('商城可用余额不足');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!payload.type) {
|
||||
sheep.$helper.toast('请选择提现方式');
|
||||
|
||||
在新工单中引用
屏蔽一个用户