fix: 首页价格显示保留两位小数 + Coin Transfer菜单翻译
1. 首页价格从 price_jd 位小数改为固定2位小数 2. translateMenuNames 支持英文 Withdraw → Coin Transfer
This commit is contained in:
+11
-3
@@ -67,7 +67,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="follow-mid">
|
<view class="follow-mid">
|
||||||
<text class="follow-price">{{Number(item.usdt).toFixed(item.price_jd)}}</text>
|
<text class="follow-price">{{Number(item.usdt).toFixed(2)}}</text>
|
||||||
<view class="follow-hot">
|
<view class="follow-hot">
|
||||||
<image class="follow-hot-icon" src="/static/imgs/index/huo.png" mode="aspectFit"></image>
|
<image class="follow-hot-icon" src="/static/imgs/index/huo.png" mode="aspectFit"></image>
|
||||||
<text class="follow-hot-num">{{virtualFollowCount(item)}}</text>
|
<text class="follow-hot-num">{{virtualFollowCount(item)}}</text>
|
||||||
@@ -384,9 +384,17 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
const lang = this.$i18n.locale || 'en-US'
|
const lang = this.$i18n.locale || 'en-US'
|
||||||
// 从 locale 提取语言 key
|
// 英文也需要翻译部分菜单名
|
||||||
|
if (lang === 'en-US') {
|
||||||
|
const enMap = { 'Withdraw': 'Coin Transfer' }
|
||||||
|
this.operatelist.forEach(item => {
|
||||||
|
if (item && item.name && enMap[item.name]) {
|
||||||
|
item.name = enMap[item.name]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
let langKey = lang
|
let langKey = lang
|
||||||
if (lang === 'en-US') return // 英文不需要翻译
|
|
||||||
const map = menuTranslations[langKey]
|
const map = menuTranslations[langKey]
|
||||||
if (!map) return
|
if (!map) return
|
||||||
this.operatelist.forEach(item => {
|
this.operatelist.forEach(item => {
|
||||||
|
|||||||
Reference in New Issue
Block a user