fix: 首页价格显示保留两位小数 + Coin Transfer菜单翻译

1. 首页价格从 price_jd 位小数改为固定2位小数
2. translateMenuNames 支持英文 Withdraw → Coin Transfer
This commit is contained in:
li
2026-03-31 10:30:32 +08:00
parent f20be4e719
commit ba0cead3af
+11 -3
View File
@@ -67,7 +67,7 @@
</view>
</view>
<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">
<image class="follow-hot-icon" src="/static/imgs/index/huo.png" mode="aspectFit"></image>
<text class="follow-hot-num">{{virtualFollowCount(item)}}</text>
@@ -384,9 +384,17 @@
},
}
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
if (lang === 'en-US') return // 英文不需要翻译
const map = menuTranslations[langKey]
if (!map) return
this.operatelist.forEach(item => {