feat(操作钱包页): 提现金额检测,当输入大于钱包金额时,自动将输入替换成金额
This commit is contained in:
parent
fdf3cea458
commit
4891feba63
@ -275,6 +275,7 @@
|
||||
|
||||
"withdrawal_method": "طريقة السحب",
|
||||
"please_select_bank_card": "يرجى اختيار بطاقة مصرفية",
|
||||
"change_withdrawal_method": "تغيير طريقة السحب",
|
||||
"enter_cash_out_amount": "يرجى إدخال مبلغ السحب",
|
||||
"cash_out_minimum": "*يجب أن يكون مبلغ السحب أكبر من أو يساوي 50 دولارًا",
|
||||
|
||||
|
||||
@ -275,6 +275,7 @@
|
||||
|
||||
"withdrawal_method": "Withdrawal Method",
|
||||
"please_select_bank_card": "Please select a bank card",
|
||||
"change_withdrawal_method": "Change withdrawal method",
|
||||
"enter_cash_out_amount": "Please enter the cash out amount",
|
||||
"cash_out_minimum": "*The cash out amount must be >= $50",
|
||||
|
||||
|
||||
@ -275,6 +275,7 @@
|
||||
|
||||
"withdrawal_method": "提现方式",
|
||||
"please_select_bank_card": "请选择银行卡",
|
||||
"change_withdrawal_method": "更改提现方式",
|
||||
"enter_cash_out_amount": "请输入提现金额",
|
||||
"cash_out_minimum": "*提现金额必须大于等于50美元",
|
||||
|
||||
|
||||
@ -617,11 +617,17 @@
|
||||
<div style="font-size: 0.9em; font-weight: 600; margin-bottom: 4px">
|
||||
{{ t('withdrawal_method') }}: {{ usedBankCard?.cardType || '' }}
|
||||
</div>
|
||||
<div v-if="usedBankCard" style="font-size: 0.9em; font-weight: 600; margin-bottom: 4px">
|
||||
{{ t('card_number') }}: {{ usedBankCard?.cardNo }}
|
||||
</div>
|
||||
<div
|
||||
style="display: flex; justify-content: space-between; align-items: center"
|
||||
@click="gotoselectBank"
|
||||
>
|
||||
<div style="font-size: 0.9em; font-weight: 600">
|
||||
<div v-if="usedBankCard" style="font-size: 0.9em; font-weight: 600">
|
||||
{{ t('change_withdrawal_method') }}
|
||||
</div>
|
||||
<div v-else style="font-size: 0.9em; font-weight: 600">
|
||||
{{ t('please_select_bank_card') }}
|
||||
</div>
|
||||
<img src="../../assets/icon/arrow.png" alt="" style="width: 6vw" class="flipImg" />
|
||||
@ -643,7 +649,8 @@
|
||||
background-color: transparent;
|
||||
color: black;
|
||||
"
|
||||
v-model="cashOutAmount"
|
||||
:value="cashOutAmount"
|
||||
@input="handleCashOutAmountInput"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -767,6 +774,11 @@ const availableIncome = ref({})
|
||||
const selectedCoin = ref(null)
|
||||
const selectedExchangeOption = ref(null)
|
||||
const activeAction = ref(route.query.activeAction || 'Exchange')
|
||||
|
||||
const availableBalance = computed(() => {
|
||||
return availableIncome.value?.availableBalance || 0
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
const exchangeTipShow = ref(false)
|
||||
@ -848,6 +860,17 @@ const hasKYC = computed(() => {
|
||||
return bankCardInfo.value != null
|
||||
})
|
||||
|
||||
//处理提现金额输入
|
||||
const handleCashOutAmountInput = (event) => {
|
||||
let value = parseFloat(event.target.value)
|
||||
|
||||
if (value > availableBalance.value) {
|
||||
value = availableBalance.value
|
||||
event.target.value = value // 更新输入框的值
|
||||
}
|
||||
cashOutAmount.value = value // 更新 cashOutAmount 的值
|
||||
}
|
||||
|
||||
// 获取提现信息列表
|
||||
const getWithdrawInfoListData = async () => {
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user