Commit 3a3f1998 authored by hewenhao's avatar hewenhao

Merge branch 'feature/2023-09-21-limit-200' into 'master'

Feature/2023 09 21 limit 200 See merge request wykolor/mall-webview!8
parents 8bdf869e 47025334
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
text-align: left; text-align: left;
padding: 0 8px; padding: 0 8px;
align-items: center; align-items: center;
&.wechat-limit {
margin-bottom: 16px;
}
i { i {
margin-right: 8px; margin-right: 8px;
} }
......
...@@ -20,11 +20,15 @@ ...@@ -20,11 +20,15 @@
type="primary" type="primary"
round round
color="#F1551E" color="#F1551E"
@click="withdrawAmount = withdrawableTotal" @click="withdrawAmount = maxWithDraw"
>全部</van-button >全部</van-button
> >
</li> </li>
<li class="input-valid">今日可提现金额¥{{ withdrawableTotal }}元</li> <li class="input-valid">今日可提现金额¥{{ withdrawableTotal }}元</li>
<li class="input-tip wechat-limit">
<i class="iconfont icon-wenhao"></i>
<span>微信限制单笔提现不超过200元!</span>
</li>
<li class="input-tip"> <li class="input-tip">
<i class="iconfont icon-wenhao"></i> <i class="iconfont icon-wenhao"></i>
<span>单日累计提现不超过{{ studentDailyWithdrawLimit }}元!</span> <span>单日累计提现不超过{{ studentDailyWithdrawLimit }}元!</span>
...@@ -93,6 +97,7 @@ const Withdraw = defineComponent({ ...@@ -93,6 +97,7 @@ const Withdraw = defineComponent({
const state = reactive<State>({ const state = reactive<State>({
withdrawAmount: 0, withdrawAmount: 0,
withdrawableTotal: 0, withdrawableTotal: 0,
maxWithDraw: 0,
showWithdraw: false, showWithdraw: false,
showWithdrawSuccess: false, showWithdrawSuccess: false,
withdrawAccount: '', withdrawAccount: '',
...@@ -102,14 +107,15 @@ const Withdraw = defineComponent({ ...@@ -102,14 +107,15 @@ const Withdraw = defineComponent({
}) })
const { withdrawableTotal, withdrawAccount, withdrawAccountId } = route.query const { withdrawableTotal, withdrawAccount, withdrawAccountId } = route.query
state.withdrawableTotal = Number(withdrawableTotal) state.withdrawableTotal = Number(withdrawableTotal)
state.maxWithDraw = Math.min(200, state.withdrawableTotal)
state.withdrawAccount = withdrawAccount as string state.withdrawAccount = withdrawAccount as string
state.withdrawAccountId = withdrawAccountId as string state.withdrawAccountId = withdrawAccountId as string
const formatter = (value: number) => { const formatter = (value: number) => {
if (value <= 0) return '' if (value <= 0) return ''
if (value > state.withdrawableTotal) { if (value > state.maxWithDraw) {
Toast(`今日可提现金额为:${state.withdrawableTotal}元`) Toast(`本次可提现金额不可超过${state.maxWithDraw}元`)
return state.withdrawableTotal.toFixed(2) return state.maxWithDraw.toFixed(2)
} }
return value && Number(value).toFixed(2) return value && Number(value).toFixed(2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment