fix: 存款页面链类型过滤 + 卡顿修复
1. BTC选择时不显示ERC-20/TRC-20链选择器 2. ETH选择时过滤掉TRC-20,只保留ERC-20 3. USDT保留全部链选项 4. 静态币种(btc_static/eth_static)不调API,构造占位数据防卡顿 5. "Select Coin"改为i18n国际化 6. 银行卡存款按钮间距修复
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
<!-- 币种选择 -->
|
||||
<view v-if="current==1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-20"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-90 padding-t-27 font-28 weight-bold">Select Coin</view>
|
||||
<view class="height-90 padding-t-27 font-28 weight-bold">{{i18n.recharge.text1}}</view>
|
||||
<view class="flex align-center flex-wrap">
|
||||
<view @click="changeCoinType(item)" v-for="(item,index) in coinTypes" :key="item.id"
|
||||
:class="currid==item.id?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.name}}
|
||||
@@ -57,13 +57,13 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 链类型 -->
|
||||
<view v-if="current==1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-20"
|
||||
<!-- 链类型:BTC 时不显示链选择器,其他币种显示过滤后的链列表 -->
|
||||
<view v-if="current==1 && filteredDetail.length > 1" class="width-100b radiu-20 padding-w-32 padding-b-20 margin-t-20"
|
||||
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
|
||||
<view class="height-90 padding-t-27 font-28 weight-bold">{{i18n.recharge.text2}}
|
||||
</view>
|
||||
<view class="flex align-center flex-wrap">
|
||||
<view @click="changelian(item,index)" v-for="(item,index) in detail"
|
||||
<view @click="changelian(item,index)" v-for="(item,index) in filteredDetail"
|
||||
:class="index==lian?'onbox':'offbox'" class="numbold-font margin-r-14">{{item.lian}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -152,7 +152,7 @@
|
||||
<view class="width-600 margin-0-auto margin-t-30">
|
||||
<u-button v-if="current==1" @click="chongzhi" class="custom-style" type="primary" style="background-color: #3ECEB2;">{{i18n.appeal.text1}}
|
||||
</u-button>
|
||||
<u-button v-if="current==2" @click="yinhangka()" class="custom-style" type="primary" style="background-color: #3ECEB2; margin-top: 300rpx;">{{i18n.appeal.text1}}
|
||||
<u-button v-if="current==2" @click="yinhangka()" class="custom-style" type="primary" style="background-color: #3ECEB2; margin-top: 30rpx;">{{i18n.appeal.text1}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -243,6 +243,28 @@
|
||||
computed: {
|
||||
i18n() {
|
||||
return this.$t('message');
|
||||
},
|
||||
// 根据当前选中币种过滤链列表
|
||||
// BTC: 只保留名称含 "BTC" 的链(或空)
|
||||
// ETH: 过滤掉 TRC-20,只保留 ERC-20
|
||||
// USDT: 保留全部
|
||||
filteredDetail() {
|
||||
if (!this.detail || this.detail.length === 0) return []
|
||||
const name = (this.curr || '').toUpperCase()
|
||||
if (name === 'BTC') {
|
||||
// BTC 不需要链选择,只取第一条直接显示地址
|
||||
return this.detail.slice(0, 1)
|
||||
}
|
||||
if (name === 'ETH') {
|
||||
// ETH 只保留 ERC-20,过滤掉 TRC-20
|
||||
const erc = this.detail.filter(item => {
|
||||
const lian = (item.lian || '').toUpperCase()
|
||||
return !lian.includes('TRC')
|
||||
})
|
||||
return erc.length > 0 ? erc : this.detail.slice(0, 1)
|
||||
}
|
||||
// USDT 及其他:保留全部
|
||||
return this.detail
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -321,8 +343,17 @@
|
||||
this.bankList = res.data.bank
|
||||
this.detail = res.data.curr
|
||||
this.lian = 0
|
||||
this.image = res.data.curr[0].qrcode
|
||||
this.zhuan_address = res.data.curr[0].address
|
||||
// 根据当前币种过滤后取第一条链的地址显示
|
||||
const name = (this.curr || '').toUpperCase()
|
||||
let firstChain = res.data.curr[0]
|
||||
if (name === 'ETH' && res.data.curr.length > 0) {
|
||||
const erc = res.data.curr.filter(item => {
|
||||
return !(item.lian || '').toUpperCase().includes('TRC')
|
||||
})
|
||||
if (erc.length > 0) firstChain = erc[0]
|
||||
}
|
||||
this.image = firstChain ? firstChain.qrcode : ''
|
||||
this.zhuan_address = firstChain ? firstChain.address : ''
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -354,6 +385,21 @@
|
||||
this.currid = item.id
|
||||
this.voucher_image = ''
|
||||
this.voucher_image_up = ''
|
||||
this.lian = 0
|
||||
// 静态条目(btc_static / eth_static)没有真实 API id
|
||||
// 不调用 getdetails,改为构造占位链数据
|
||||
if (item.id === 'btc_static') {
|
||||
this.detail = [{ lian: 'BTC', qrcode: '', address: '' }]
|
||||
this.image = ''
|
||||
this.zhuan_address = ''
|
||||
return
|
||||
}
|
||||
if (item.id === 'eth_static') {
|
||||
this.detail = [{ lian: 'ERC-20', qrcode: '', address: '' }]
|
||||
this.image = ''
|
||||
this.zhuan_address = ''
|
||||
return
|
||||
}
|
||||
this.getdetails(this.currid)
|
||||
},
|
||||
changecurr(item) {
|
||||
|
||||
Reference in New Issue
Block a user