refactor(fenxiao,member): replace hardcoded strings with i18n translations

standardize all hardcoded text across分销 and member pages to use language packs, fix template syntax errors in level.vue, and unify text display logic
This commit is contained in:
2026-06-22 16:20:59 +08:00
parent d8705398bb
commit cb81aad784
9 changed files with 109 additions and 109 deletions

View File

@@ -14,10 +14,10 @@
@click="toDetail(orderItem.fenxiao_order_id)">
<view class="order-header">
<text class="site-name font-size-base">{{ orderItem.order_no }}</text>
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">已退款</text>
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">{{ $lang('fenxiao.refunded') }}</text>
<text class="status-name color-text-green"
v-else-if="orderItem.is_settlement == 1">已结算</text>
<text class="status-name color-text-orange" v-else>待结算</text>
v-else-if="orderItem.is_settlement == 1">{{ $lang('fenxiao.settled') }}</text>
<text class="status-name color-text-orange" v-else>{{ $lang('fenxiao.pendingSettlement') }}</text>
</view>
<view class="order-body">
@@ -30,7 +30,7 @@
<view class="top-wrap">
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
<view>
<text class="color-tip">返{{ fenxiaoWords.account }}</text>
<text class="color-tip">{{ $lang('fenxiao.commission') }}</text>
<text class="price-color price-style small">{{
$lang('common.currencySymbol') }}</text>
<text class="price-color price-style large">{{
@@ -66,7 +66,7 @@
<text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> -->
</view>
<view class="total">
<text>合计:</text>
<text>{{ $lang('fenxiao.total') }}:</text>
<text class="price-color">{{ $lang('common.currencySymbol') }}</text>
<text class="price-color font-size-toolbar">{{
parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text>
@@ -78,13 +78,13 @@
</view>
</view>
<view class="cart-empty">
<ns-empty text="暂无订单" :isIndex="false"
<ns-empty :text="$lang('fenxiao.emptyOrder')" :isIndex="false"
v-if="selectId == 0 && orderList.length == 0 && emptyShow"></ns-empty>
<ns-empty text="暂无待结算订单" :isIndex="false"
<ns-empty :text="$lang('fenxiao.emptyPendingSettleOrder')" :isIndex="false"
v-if="selectId == 1 && orderList.length == 0 && emptyShow"></ns-empty>
<ns-empty text="暂无已结算订单" :isIndex="false"
<ns-empty :text="$lang('fenxiao.emptySettledOrder')" :isIndex="false"
v-if="selectId == 2 && orderList.length == 0 && emptyShow"></ns-empty>
<ns-empty text="暂无已退款订单" :isIndex="false"
<ns-empty :text="$lang('fenxiao.emptyRefundedOrder')" :isIndex="false"
v-if="selectId == 3 && orderList.length == 0 && emptyShow"></ns-empty>
</view>
</view>
@@ -108,22 +108,22 @@ export default {
category: [
{
id: 0,
name: '全部',
name: this.$lang('fenxiao.all'),
number: 2
},
{
id: 1,
name: '待结算',
name: this.$lang('fenxiao.pendingSettlement'),
number: 0
},
{
id: 2,
name: '已结算',
name: this.$lang('fenxiao.settled'),
number: 0
},
{
id: 3,
name: '已退款',
name: this.$lang('fenxiao.refunded'),
number: 0
}
],
@@ -142,7 +142,7 @@ export default {
setTimeout(() => {
if (!this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
title: this.$lang('fenxiao.merchantNotOpenFenxiao'),
mask: true,
duration: 2000
});
@@ -152,7 +152,7 @@ export default {
}
}, 1000);
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '订单');
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + this.$lang('fenxiao.order'));
if (!this.storeToken) {
this.$nextTick(() => {