feat(活动提现页面): 门槛回退到4月15号的更改之前

This commit is contained in:
hzj 2026-05-09 12:01:40 +08:00
parent 2991e9ef8c
commit f374e242d0
6 changed files with 18 additions and 63 deletions

View File

@ -278,6 +278,7 @@
"please_select_bank_card": "يرجى اختيار بطاقة مصرفية",
"change_withdrawal_method": "تغيير طريقة السحب",
"enter_cash_out_amount": "يرجى إدخال مبلغ السحب",
"cash_out_min_amount_tip": "*يجب أن يكون مبلغ السحب >= $10",
"cash_withdraw": "سحب نقدي",
"bank_card": "بطاقة مصرفية",

View File

@ -278,6 +278,7 @@
"please_select_bank_card": "দয়া করে একটি ব্যাংক কার্ড নির্বাচন করুন",
"change_withdrawal_method": "উত্তোলন পদ্ধতি পরিবর্তন",
"enter_cash_out_amount": "দয়া করে নগদ উত্তোলনের পরিমাণ লিখুন",
"cash_out_min_amount_tip": "*নগদ উত্তোলনের পরিমাণ অবশ্যই >= $10 হতে হবে",
"cash_withdraw": "নগদ উত্তোলন",
"bank_card": "ব্যাংক কার্ড",

View File

@ -278,6 +278,7 @@
"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_min_amount_tip": "*The cash out amount must be >= $10",
"cash_withdraw": "Cash Withdraw",
"bank_card": "Bank Card",

View File

@ -278,6 +278,7 @@
"please_select_bank_card": "Lütfen bir banka kartı seçin",
"change_withdrawal_method": "Çekim yöntemini değiştir",
"enter_cash_out_amount": "Lütfen nakit çekme miktarını girin",
"cash_out_min_amount_tip": "*Nakit çekme tutarı >= $10 olmalıdır",
"cash_withdraw": "Nakit Çekim",
"bank_card": "Banka Kartı",

View File

@ -278,6 +278,7 @@
"please_select_bank_card": "请选择银行卡",
"change_withdrawal_method": "更改提现方式",
"enter_cash_out_amount": "请输入提现金额",
"cash_out_min_amount_tip": "*提现金额必须 >= $10",
"cash_withdraw": "现金提现",
"bank_card": "银行卡",

View File

@ -338,9 +338,7 @@
</div>
<div style="color: rgba(0, 0, 0, 0.4); font-weight: 600; font-size: 0.9em">
{{ t('withdrawal_rule_1', { amount: withdrawalThresholdDisplay }) }}
<br />
{{ t('withdrawal_rule_2', { fee: withdrawalServiceChargeDisplay }) }}
{{ t('cash_out_min_amount_tip') }}
</div>
<div style="display: flex; justify-content: center; align-items: center">
@ -429,7 +427,6 @@ import { setApplyInfo, getApplyInfo } from '@/utils/applyStore.js'
import { ref, onMounted, computed, onUnmounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { setDocumentDirection } from '@/locales/i18n'
import { showError } from '@/utils/toast.js'
import {
withdrawableAmount, //
@ -438,8 +435,6 @@ import {
import {
getBankCardList, //使
getWithdrawInfoList, //
apiGetUsdWithdrawServiceCharge, //
apiGetUsdWithdrawalThreshold, //
} from '@/api/wallet.js'
import GeneralHeader from '@/components/GeneralHeader.vue'
@ -457,10 +452,6 @@ const cashOutTypeShow = ref(false)
const cashOutShow = ref(false)
const cashOutAmount = ref(null)
//
const withdrawalServiceCharge = ref(20)
//
const withdrawalThreshold = ref(50)
const maskLayerShow = computed(() => {
return cashOutTipShow.value || cashOutShow.value || cashOutTypeShow.value
@ -486,27 +477,6 @@ const hasKYC = computed(() => {
return bankCardInfo.value != null
})
// NaN
const formatRuleNumber = (value) => {
const numericValue = Number(value)
if (!Number.isFinite(numericValue)) {
return '0'
}
return numericValue.toString()
}
//
const withdrawalServiceChargeDisplay = computed(() => {
return formatRuleNumber(withdrawalServiceCharge.value)
})
//
const withdrawalThresholdDisplay = computed(() => {
return formatRuleNumber(withdrawalThreshold.value)
})
//
const gotoselectBank = () => {
router.push('/bank-card')
@ -533,11 +503,7 @@ const CashOut = () => {
//
const checkStatus = computed(() => {
return (
bankCardInfo.value?.status == 'PASS' &&
usedBankCard.value?.id &&
cashOutAmount.value >= withdrawalThreshold.value
)
return bankCardInfo.value?.status == 'PASS' && usedBankCard.value?.id && cashOutAmount.value >= 10
})
//
@ -574,44 +540,29 @@ const getDrawableAmount = async () => {
}
}
//
const getWithdrawConfig = async () => {
try {
const resServiceCharge = await apiGetUsdWithdrawServiceCharge()
if (resServiceCharge.status && typeof resServiceCharge.body === 'number') {
withdrawalServiceCharge.value = resServiceCharge.body
}
} catch (error) {
console.error('获取提现手续费失败:', error)
}
try {
const resThreshold = await apiGetUsdWithdrawalThreshold()
if (resThreshold.status && typeof resThreshold.body === 'number') {
withdrawalThreshold.value = resThreshold.body
}
} catch (error) {
console.error('获取提现门槛失败:', error)
}
}
const handleCashOutAmountInput = (event) => {
let value = event.target.value
//
value = value.replace(/[^\d]/g, '')
//
value = value.replace(/[^\d.]/g, '')
//
const parts = value.split('.')
if (parts.length > 2) {
value = parts[0] + '.' + parts.slice(1).join('')
}
//
const numericValue = parseInt(value, 10)
const numericValue = parseFloat(value)
if (numericValue > availableBalance.value) {
value = Math.floor(Number(availableBalance.value)).toString()
value = availableBalance.value.toString()
}
//
event.target.value = value
// cashOutAmount
cashOutAmount.value = parseInt(value, 10) || 0
cashOutAmount.value = parseFloat(value) || 0
}
//
@ -650,7 +601,6 @@ const getBankCards = async () => {
onMounted(() => {
getDrawableAmount() //
getWithdrawConfig() //
getWithdrawInfoListData() //
getBankCards() // 使
})