新增:Cash支付渠道

This commit is contained in:
马丁 2026-07-04 20:19:02 +08:00
parent 49ccbec0da
commit 6d9fd73f5d
6 changed files with 61 additions and 8 deletions

View File

@ -12,14 +12,16 @@
<div class="deposit-header-leading">
<h2
class="deposit-title"
:class="{ 'deposit-title--substep': step === 'crypto' || step === 'exchange' }"
:class="{ 'deposit-title--substep': step !== 'method' }"
>
{{
step === 'crypto'
? t('deposit.transferCrypto')
: step === 'exchange'
? t('deposit.connectExchange')
: t('deposit.title')
: step === 'cash'
? t('deposit.useCash')
: t('deposit.title')
}}
</h2>
<span
@ -34,9 +36,7 @@
icon
variant="text"
class="close-btn"
:aria-label="
step === 'crypto' || step === 'exchange' ? t('common.back') : t('deposit.close')
"
:aria-label="step !== 'method' ? t('common.back') : t('deposit.close')"
@click="headerClose"
>
<v-icon size="18">mdi-close</v-icon>
@ -85,9 +85,31 @@
<div class="method-card-divider" aria-hidden="true" />
<div class="method-desc">{{ t('deposit.noLimit') }} {{ t('deposit.twoMin') }}</div>
</div>
<div
class="method-card"
role="button"
tabindex="0"
@click="selectMethod('cash')"
@keydown.enter.prevent="selectMethod('cash')"
@keydown.space.prevent="selectMethod('cash')"
>
<div class="method-card-top">
<div class="method-icon cash-method-icon">
<v-icon size="22">mdi-cash</v-icon>
</div>
<div class="method-name">{{ t('deposit.useCash') }}</div>
<v-icon class="method-arrow" size="20">mdi-chevron-right</v-icon>
</div>
<div class="method-card-divider" aria-hidden="true" />
<div class="method-desc">{{ t('deposit.useCashSub') }}</div>
</div>
</div>
</template>
<template v-else-if="step === 'cash'">
<p class="cash-empty-text">{{ t('deposit.noPaymentMethodsInRegion') }}</p>
</template>
<!-- Transfer Crypto选择网络 + 充值地址对齐 Pencil LFLO6 -->
<template v-else-if="step === 'crypto'">
<label class="crypto-field-label">{{ t('deposit.network') }}</label>
@ -323,7 +345,7 @@ const depositAddress = ref('')
const loading = ref(false)
const loadError = ref('')
const step = ref<'method' | 'crypto' | 'exchange'>('method')
const step = ref<'method' | 'crypto' | 'exchange' | 'cash'>('method')
const selectedNetwork = ref(WALLET_PRIMARY_NETWORK_ID)
const copied = ref(false)
const exchangeConnected = ref(false)
@ -636,7 +658,7 @@ function close() {
}
function headerClose() {
if (step.value === 'crypto' || step.value === 'exchange') {
if (step.value !== 'method') {
stopDepositCheck()
step.value = 'method'
return
@ -644,8 +666,9 @@ function headerClose() {
close()
}
function selectMethod(m: 'crypto' | 'exchange') {
function selectMethod(m: 'crypto' | 'exchange' | 'cash') {
step.value = m
if (m === 'cash') return
if (m === 'exchange') {
exchangeConnected.value = false
selectedNetwork.value = WALLET_PRIMARY_NETWORK_ID
@ -1302,6 +1325,10 @@ onUnmounted(() => {
background: #dcfce7;
color: #059669;
}
.cash-method-icon {
background: #fef3c7;
color: #d97706;
}
.method-name {
flex: 1;
min-width: 0;
@ -1391,4 +1418,15 @@ onUnmounted(() => {
text-align: center;
padding: 8px 0 16px;
}
.cash-empty-text {
margin: 0;
padding: 32px 8px 40px;
text-align: center;
font-size: 0.875rem;
font-weight: 500;
color: #6b7280;
line-height: 1.5;
letter-spacing: normal;
}
</style>

View File

@ -386,6 +386,9 @@
"transferCrypto": "Transfer Crypto",
"transferCryptoSub": "No limits • Fast • Tap below to sync balance once it arrives",
"connectExchange": "Transfer with current wallet",
"useCash": "Use Cash",
"useCashSub": "Debit card • Bank transfer",
"noPaymentMethodsInRegion": "There are currently no available payment methods in your region",
"noLimit": "No limit",
"instant": "Instant",
"twoMin": "2 min",

View File

@ -386,6 +386,9 @@
"transferCrypto": "暗号資産を送金",
"transferCryptoSub": "制限なし • 即時 • 着金後、下のボタンで残高に反映",
"connectExchange": "現在のウォレットで送金",
"useCash": "Use Cash",
"useCashSub": "デビットカード • 銀行振込",
"noPaymentMethodsInRegion": "お住まいの地域では現在利用可能な支払い方法がありません",
"noLimit": "制限なし",
"instant": "即時",
"twoMin": "約2分",

View File

@ -386,6 +386,9 @@
"transferCrypto": "암호화폐 전송",
"transferCryptoSub": "제한 없음 • 즉시 • 입금 확인 후 하단에서 잔액 동기화",
"connectExchange": "현재 지갑으로 송금",
"useCash": "Use Cash",
"useCashSub": "직불카드 • 계좌이체",
"noPaymentMethodsInRegion": "현재 거주 지역에서 사용 가능한 결제 수단이 없습니다",
"noLimit": "제한 없음",
"instant": "즉시",
"twoMin": "약 2분",

View File

@ -386,6 +386,9 @@
"transferCrypto": "转账加密货币",
"transferCryptoSub": "无限制 • 即时 • 到账后可在底部一键同步余额",
"connectExchange": "使用当前钱包转账",
"useCash": "Use Cash",
"useCashSub": "借记卡 • 银行转账",
"noPaymentMethodsInRegion": "您所在地区目前没有可用的付款方式",
"noLimit": "无限制",
"instant": "即时到账",
"twoMin": "约 2 分钟",

View File

@ -386,6 +386,9 @@
"transferCrypto": "轉帳加密貨幣",
"transferCryptoSub": "無限制 • 即時 • 到帳後可在底部一鍵同步餘額",
"connectExchange": "使用當前錢包轉帳",
"useCash": "Use Cash",
"useCashSub": "借記卡 • 銀行轉帳",
"noPaymentMethodsInRegion": "您所在地區目前沒有可用的付款方式",
"noLimit": "無限制",
"instant": "即時到帳",
"twoMin": "約 2 分鐘",