refactor: 统一项目内国际化key的命名空间格式

本次提交对全项目的国际化调用进行了规范化重构:
1. 为中文/英文语言包新增了avatar和gender的别名映射,兼容旧有headImg/sex写法
2. 修正了lang.js中的注释路径错误
3. 将所有页面和组件内的$lang调用从短路径改为带业务模块前缀的完整命名空间路径,例如将$lang('title')改为$lang('article.list.title')
4. 优化了i18n-lazy.js的注释说明,补充了正确的key命名格式示例
5. 统一了分销、订单、会员等模块的国际化key层级,确保所有语言调用路径一致
This commit is contained in:
2026-07-04 09:24:35 +08:00
parent 92e8823566
commit 783c10fc62
98 changed files with 1543 additions and 1530 deletions

View File

@@ -2,8 +2,8 @@
<view class="container" :style="themeColor">
<view class="bank-account-wrap" @click="goAccount()">
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type && !isBalance">
<text class="tx-to">{{ $lang('withdrawTo') }}</text>
<view class="tx-bank" v-if="bankAccountInfo.withdraw_type == 'wechatpay'">{{ $lang('wechatDefaultWallet') }}</view>
<text class="tx-to">{{ $lang('fenxiao.withdraw_apply.withdrawTo') }}</text>
<view class="tx-bank" v-if="bankAccountInfo.withdraw_type == 'wechatpay'">{{ $lang('fenxiao.withdraw_apply.wechatDefaultWallet') }}</view>
<view class="tx-bank" v-else>{{ bankAccountInfo.bank_account }} </view>
<view class="tx-img" v-if="bankAccountInfo.withdraw_type == 'alipay'">
<image :src="$util.img('public/uniapp/member/apply_withdrawal/alipay.png')" mode="widthFix" show-menu-by-longpress></image>
@@ -16,10 +16,10 @@
</image>
</view>
</view>
<text class="tx-to" v-else-if="!isBalance">{{ $lang('pleaseAddWithdrawAccount') }}</text>
<text class="tx-to" v-else-if="!isBalance">{{ $lang('fenxiao.withdraw_apply.pleaseAddWithdrawAccount') }}</text>
<view class="tx-wrap" v-else="isBalance">
<text class="tx-to">{{ $lang('withdrawTo') }}</text>
<view class="tx-bank">{{ $lang('balance') }}</view>
<text class="tx-to">{{ $lang('fenxiao.withdraw_apply.withdrawTo') }}</text>
<view class="tx-bank">{{ $lang('fenxiao.withdraw_apply.balance') }}</view>
<view class="tx-img">
<image :src="$util.img('public/uniapp/member/apply_withdrawal/tixian.png')" mode="widthFix" show-menu-by-longpress></image>
</view>
@@ -28,7 +28,7 @@
</view>
<view class="empty-box"></view>
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">{{ $lang('withdrawAmountLabel') }}</view>
<view class="withdraw-wrap-title">{{ $lang('fenxiao.withdraw_apply.withdrawAmountLabel') }}</view>
<view class="money-wrap">
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
<input type="digit" class="withdraw-money" v-model="withdrawMoney" />
@@ -38,14 +38,14 @@
</view>
<view class="bottom">
<view>
<text class="color-tip">{{ $lang('withdrawableAmountLabel') }}{{ $lang('common.currencySymbol') }}{{ withdrawInfo.account | moneyFormat }}</text>
<text class="all-tx color-base-text" @click="allTx">{{ $lang('withdrawAll') }}</text>
<text class="color-tip">{{ $lang('fenxiao.withdraw_apply.withdrawableAmountLabel') }}{{ $lang('common.currencySymbol') }}{{ withdrawInfo.account | moneyFormat }}</text>
<text class="all-tx color-base-text" @click="allTx">{{ $lang('fenxiao.withdraw_apply.withdrawAll') }}</text>
</view>
</view>
<view class="desc">
<text v-if="withdrawConfigInfo.withdraw > 0">{{ $lang('minWithdrawAmountTip', { symbol: $lang('common.currencySymbol'), min: withdrawConfigInfo.withdraw | moneyFormat }) }}</text>
<text v-if="withdrawConfigInfo.max > 0">{{ $lang('maxWithdrawAmountTip', { symbol: $lang('common.currencySymbol'), max: (withdrawConfigInfo.max > withdrawInfo.account ? withdrawInfo.account : withdrawConfigInfo.max) | moneyFormat }) }}</text>
<text>{{ $lang('serviceFeeTip', { rate: withdrawConfigInfo.withdraw_rate + '%' }) }}</text>
<text v-if="withdrawConfigInfo.withdraw > 0">{{ $lang('fenxiao.withdraw_apply.minWithdrawAmountTip', { symbol: $lang('common.currencySymbol'), min: withdrawConfigInfo.withdraw | moneyFormat }) }}</text>
<text v-if="withdrawConfigInfo.max > 0">{{ $lang('fenxiao.withdraw_apply.maxWithdrawAmountTip', { symbol: $lang('common.currencySymbol'), max: (withdrawConfigInfo.max > withdrawInfo.account ? withdrawInfo.account : withdrawConfigInfo.max) | moneyFormat }) }}</text>
<text>{{ $lang('fenxiao.withdraw_apply.serviceFeeTip', { rate: withdrawConfigInfo.withdraw_rate + '%' }) }}</text>
</view>
</view>
@@ -56,7 +56,7 @@
<view class="grace-page-footer page-btm" style="z-index: 999999; background: rgb(255, 255, 255); padding-bottom: 0px;" @click="withdraw">
<view data-v-800ec5da="" class="collectionBorder">
<button data-v-800ec5da="" class="renren-btn do false middle">{{ $lang('withdrawBtn') }}</button>
<button data-v-800ec5da="" class="renren-btn do false middle">{{ $lang('fenxiao.withdraw_apply.withdrawBtn') }}</button>
</view>
</view>
@@ -175,7 +175,7 @@
verify() {
if (this.withdrawMoney == '' || this.withdrawMoney < 0 || isNaN(parseFloat(this.withdrawMoney))) {
this.$util.showToast({
title: this.$lang('pleaseEnterWithdrawAmount')
title: this.$lang('fenxiao.withdraw_apply.pleaseEnterWithdrawAmount')
});
return false;
}
@@ -186,14 +186,14 @@
}
if (parseFloat(this.withdrawMoney) > 0 && (parseFloat(this.withdrawMoney) > parseFloat(money))) {
this.$util.showToast({
title: this.$lang('withdrawAmountExceeds')
title: this.$lang('fenxiao.withdraw_apply.withdrawAmountExceeds')
});
return false;
}
if (parseFloat(this.withdrawMoney) > 0 && (parseFloat(this.withdrawMoney) < parseFloat(this
.withdrawConfigInfo.withdraw))) {
this.$util.showToast({
title: this.$lang('withdrawAmountBelowMin')
title: this.$lang('fenxiao.withdraw_apply.withdrawAmountBelowMin')
});
return false;
}
@@ -202,7 +202,7 @@
withdraw() {
if (!this.bankAccountInfo.withdraw_type && !this.isBalance) {
this.$util.showToast({
title: this.$lang('pleaseAddWithdrawMethod')
title: this.$lang('fenxiao.withdraw_apply.pleaseAddWithdrawMethod')
});
return;
}
@@ -235,7 +235,7 @@
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: this.$lang('withdrawApplySuccess')
title: this.$lang('fenxiao.withdraw_apply.withdrawApplySuccess')
});
setTimeout(() => {
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_list', {},
@@ -270,7 +270,7 @@
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: this.$lang('withdrawApplySuccess')
title: this.$lang('fenxiao.withdraw_apply.withdrawApplySuccess')
});
setTimeout(() => {
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_list', {},