refactor(fenxiao,point): 替换页面硬编码文本为多语言配置

将分销和积分商城页面中的硬编码字符串全部替换为语言包调用,统一项目多语言适配,提升页面文本可维护性和国际化支持
This commit is contained in:
2026-06-22 15:25:19 +08:00
parent a2a637c320
commit 47f21f391c
6 changed files with 77 additions and 77 deletions

View File

@@ -25,11 +25,11 @@
<view class="info">
<view class="apply-item">
<view class="title">{{ $lang('fenxiao.inviter') }}</view>
<text class="shuru">{{ sourceMemberInfo.fenxiao_name }}</text>
<text class="shuru">{{ sourceMemberInfo.fenxiao_name || $lang('fenxiao.none') }}</text>
</view>
<view class="apply-item">
<view class="title">{{ fenxiaoWords.fenxiao_name }}{{ $lang('fenxiao.name') }}</view>
<input class="input" type="text" maxlength="30" :placeholder="'请输入' + fenxiaoWords.fenxiao_name + '名称'" v-model="formData.fenXiaoName" placeholder-class="pla-cla" />
<input class="input" type="text" maxlength="30" :placeholder="$lang('fenxiao.inputFenxiaoName')" v-model="formData.fenXiaoName" placeholder-class="pla-cla" />
</view>
<view class="apply-item">
<view class="title">{{ $lang('member.mobile') }}</view>
@@ -114,7 +114,7 @@
</view>
</view>
<view class="content-lists" v-if="isShow" @click="onOpen()">
{{ isOpen ? '展开更多' : '收起' }}
{{ isOpen ? $lang('fenxiao.expandMore') : $lang('fenxiao.collapse') }}
<text class="iconfont icon-unfold" style="font-weight: bold;" v-if="isOpen"></text>
<text class="iconfont icon-fold" v-else></text>
</view>
@@ -123,15 +123,15 @@
</view>
<view class="empty" v-else>
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
<text>您还不是分销商</text>
<text>{{ $lang('fenxiao.notDistributor') }}</text>
</view>
</view>
<view class="empty" v-else>
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
<text v-if="status == 1">您已提交{{ fenxiaoWords.fenxiao_name }}申请,等待平台审核</text>
<text v-if="status == 1">{{ $lang('fenxiao.submittedWaitAudit', { fenxiao_name: fenxiaoWords.fenxiao_name }) }}</text>
<block v-else-if="status == -1">
<text>您提交的{{ fenxiaoWords.fenxiao_name }}申请,已被拒绝,请再接再厉</text>
<view class="again-btn color-base-bg" @click="againApply">重新申请</view>
<text>{{ $lang('fenxiao.applicationRejected', { fenxiao_name: fenxiaoWords.fenxiao_name }) }}</text>
<view class="again-btn color-base-bg" @click="againApply">{{ $lang('fenxiao.reapply') }}</view>
</block>
</view>
<view @touchmove.prevent v-if="fenXiaoAgreement.document">
@@ -163,7 +163,7 @@
isIphoneX: false,
// 推荐人信息
sourceMemberInfo: {
fenxiao_name: '无'
fenxiao_name: ''
},
formData: {
fenXiaoName: '',
@@ -191,7 +191,7 @@
setTimeout( () => {
if (!this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
title: this.$lang('fenxiao.merchantNotOpenFenxiao'),
mask: true,
duration: 2000
});
@@ -275,7 +275,7 @@
if (!this.fenXiaoValidata()) return;
if (this.isAgreement && !this.isChecked) {
this.$util.showToast({
title: '请仔细阅读协议,并勾选'
title: this.$lang('fenxiao.pleaseReadAgreement')
});
return;
}
@@ -330,17 +330,17 @@
let rule = [{
name: 'fenXiaoName',
checkType: 'required',
errorMsg: '请输入' + this.fenxiaoWords.fenxiao_name + '名称'
errorMsg: this.$lang('fenxiao.inputFenxiaoName')
},
{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
errorMsg: this.$lang('fenxiao.inputPhone')
},
{
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
errorMsg: this.$lang('fenxiao.inputPhoneCorrect')
}
];
var checkRes = validate.check(this.formData, rule);