feat: add and optimize multiple multilingual language packs

1. 新增拼团、砍价、分销、支付、地址、账户等多业务场景的中英文本地化文案
2. 替换项目中硬编码的文本为多语言调用,统一前端页面文案展示
3. 新增多个业务组件的国际化语言配置文件
This commit is contained in:
2026-06-26 10:17:33 +08:00
parent 066ca61d97
commit 66a579d48c
73 changed files with 1378 additions and 380 deletions

View File

@@ -7,7 +7,7 @@
v-if="type == 'fenxiao' && payList && payList.balance">
<view class="item-top">
<view class="item-left">
<view class="title-text">提现到余额</view>
<view class="title-text">{{ $lang('withdrawToBalance') }}</view>
</view>
</view>
</view>
@@ -22,19 +22,19 @@
</view>
<view class="content-bottom">
<block v-if="item.withdraw_type == 'alipay'">
提现账号:{{ item.bank_account }}
{{ $lang('withdrawalAccountLabel', { account: item.bank_account }) }}
</block>
<block v-if="item.withdraw_type == 'bank'">
银行名称 :{{ item.branch_bank_name }}
{{ $lang('bankNameLabel', { bankName: item.branch_bank_name }) }}
</block>
</view>
</view>
<view class="item-btn" @click.stop="editAccount('edit', item.id)">修改</view>
<view class="item-btn" @click.stop="editAccount('edit', item.id)">{{ $lang('update') }}</view>
</view>
<view class="item-bottom">
<view class="account-default" @click="setDefault(item.id, item.is_default)">
<text class="default">设为默认账户</text>
<text class="default">{{ $lang('setAsDefault') }}</text>
<switch v-if="item.is_default == 1" checked disabled style="transform:scale(0.7)"
:color="themeStyle.main_color" />
<switch v-else style="transform:scale(0.7)" :color="themeStyle.main_color" />
@@ -52,7 +52,7 @@
v-if="dataList.length <= 0 && (type != 'fenxiao' || (type == 'fenxiao' && payList && !payList.balance))"
class="empty-box">
<image :src="$util.img('public/uniapp/member/account/empty.png')" mode="widthFix" show-menu-by-longpress></image>
<view class="tips">暂无账户信息,请添加</view>
<view class="tips">{{ $lang('emptyTip') }}</view>
<button type="primary" class="add-account" @click="editAccount('add')">{{ $lang('newAddAccount')
}}</button>
</view>
@@ -103,8 +103,8 @@ export default {
},
deleteAccount(id) {
uni.showModal({
title: '操作提示',
content: '确定要删除该账户吗?',
title: this.$lang('operationTip'),
content: this.$lang('confirmDeleteAccount'),
success: res => {
if (res.confirm) {
this.$api.sendRequest({
@@ -115,12 +115,12 @@ export default {
success: result => {
if (result.code == 0) {
this.$util.showToast({
title: '删除成功'
title: this.$lang('deleteSuccess')
});
this.$refs.mescroll.refresh();
} else {
this.$util.showToast({
title: '删除失败'
title: this.$lang('deleteFailed')
});
}
}
@@ -181,9 +181,9 @@ export default {
this.dataList = this.dataList.concat(newArr); //追加新数据
let withdrawType = {
bank: '银行',
alipay: '支付宝',
wechatpay: '微信'
bank: this.$lang('withdrawTypeBank'),
alipay: this.$lang('withdrawTypeAlipay'),
wechatpay: this.$lang('withdrawTypeWechat')
};
this.dataList.forEach(item => {

View File

@@ -35,8 +35,8 @@
<view class="address-item-bottom">
<view class="address-default" @click="setDefault(item.id, item.is_default)">
<text class="default" v-if="localType == 2 && item.local_data">设为默认地址</text>
<text class="default" v-else>设为默认地址</text>
<text class="default" v-if="localType == 2 && item.local_data">{{ $lang('setAsDefault') }}</text>
<text class="default" v-else>{{ $lang('setAsDefault') }}</text>
<switch v-if="item.is_default == 1" checked disabled style="transform:scale(0.7)"
:color="themeStyle.main_color" />
<switch v-else style="transform:scale(0.7)" :color="themeStyle.main_color" />
@@ -54,7 +54,7 @@
<view v-if="addressList.length == 0 && showEmpty" class="empty-box">
<image :src="$util.img('public/uniapp/member/address/empty.png')" mode="widthFix" show-menu-by-longpress/>
<view class="tips">暂无收货地址,请添加</view>
<view class="tips">{{ $lang('emptyTip') }}</view>
<button type="primary" class="add-address" @click="addAddress('add')">{{ $lang('newAddAddress')
}}</button>
@@ -192,13 +192,13 @@ export default {
/* 删除地址信息 */
deleteAddress(id, is_default) {
uni.showModal({
title: '操作提示',
content: '确定要删除该地址吗?',
title: this.$lang('operationTip'),
content: this.$lang('confirmDelete'),
success: res => {
if (res.confirm) {
if (is_default == 1) {
this.$util.showToast({
title: '默认地址,不能删除'
title: this.$lang('cannotDeleteDefault')
});
return;
}
@@ -210,11 +210,11 @@ export default {
success: res => {
if (res.code == 0) {
this.$util.showToast({
title: '删除成功'
title: this.$lang('deleteSuccess')
});
} else {
this.$util.showToast({
title: '删除失败'
title: this.$lang('deleteFail')
});
}
this.$refs.mescroll.refresh();
@@ -244,7 +244,7 @@ export default {
this.addressList = [];
this.$refs.mescroll.refresh();
this.$util.showToast({
title: '修改默认地址成功'
title: this.$lang('setDefaultSuccess')
});
}
} else {
@@ -290,7 +290,7 @@ export default {
});
} else {
this.$util.showToast({
title: res.errMsg == 'openAddress:function not implement' ? 'PC端微信不支持一键获取地址' : res.errMsg
title: res.errMsg == 'openAddress:function not implement' ? this.$lang('pcWechatNotSupportGetAddress') : res.errMsg
});
}
});

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">
<text class="tx-to">提现到</text>
<view class="tx-bank" v-if="bankAccountInfo.withdraw_type == 'wechatpay'">微信默认钱包</view>
<text class="tx-to">{{ $lang('member.applyWithdrawal.withdrawTo') }}</text>
<view class="tx-bank" v-if="bankAccountInfo.withdraw_type == 'wechatpay'">{{ $lang('member.applyWithdrawal.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,12 +16,12 @@
</image>
</view>
</view>
<text class="tx-to" v-else>请添加提现方式</text>
<text class="tx-to" v-else>{{ $lang('member.applyWithdrawal.pleaseAddWithdrawMethod') }}</text>
<view class="iconfont icon-right"></view>
</view>
<view class="empty-box"></view>
<view class="withdraw-wrap">
<view class="withdraw-wrap-title">提现金额</view>
<view class="withdraw-wrap-title">{{ $lang('member.applyWithdrawal.withdrawAmount') }}</view>
<view class="money-wrap">
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
<input type="digit" class="withdraw-money" v-model="withdrawMoney" />
@@ -31,22 +31,21 @@
</view>
<view class="bootom">
<view>
<text class="color-tip">可提现余额:{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance_money | moneyFormat }}</text>
<text class="all-tx color-base-text" @click="allTx">全部提现</text>
<text class="color-tip">{{ $lang('member.applyWithdrawal.withdrawableBalance') }}{{ $lang('common.currencySymbol') }}{{ withdrawInfo.member_info.balance_money | moneyFormat }}</text>
<text class="all-tx color-base-text" @click="allTx">{{ $lang('member.applyWithdrawal.withdrawAll') }}</text>
</view>
</view>
<view class="desc">
<text>最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawInfo.config.min | moneyFormat }}</text>
<text>,手续费为{{ withdrawInfo.config.rate + '%' }}</text>
<text>{{ $lang('member.applyWithdrawal.minWithdrawAndFeeTip', { min: $lang('common.currencySymbol') + (withdrawInfo.config.min | moneyFormat), rate: withdrawInfo.config.rate + '%' }) }}</text>
</view>
</view>
<view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal" :class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }" @click="withdraw">
提现
{{ $lang('member.applyWithdrawal.withdraw') }}
</view>
<view class="recoend" @click="toWithdrawal">
<view class="recoend-con">提现记录</view>
<view class="recoend-con">{{ $lang('member.applyWithdrawal.withdrawalRecords') }}</view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
</view>
@@ -106,7 +105,7 @@
this.withdrawInfo = res.data;
if (this.withdrawInfo.config.is_use == 0) {
this.$util.showToast({
title: '未开启提现'
title: this.$lang('member.applyWithdrawal.withdrawalNotEnabled')
});
setTimeout(() => {
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
@@ -136,19 +135,19 @@
verify() {
if (this.withdrawMoney == '' || this.withdrawMoney == 0 || isNaN(parseFloat(this.withdrawMoney))) {
this.$util.showToast({
title: '请输入提现金额'
title: this.$lang('member.applyWithdrawal.pleaseEnterWithdrawAmount')
});
return false;
}
if (parseFloat(this.withdrawMoney) > parseFloat(this.withdrawInfo.member_info.balance_money)) {
this.$util.showToast({
title: '提现金额超出可提现金额'
title: this.$lang('member.applyWithdrawal.withdrawAmountExceedsBalance')
});
return false;
}
if (parseFloat(this.withdrawMoney) < parseFloat(this.withdrawInfo.config.min)) {
this.$util.showToast({
title: '提现金额小于最低提现金额'
title: this.$lang('member.applyWithdrawal.withdrawAmountBelowMinimum')
});
return false;
}
@@ -157,7 +156,7 @@
withdraw() {
if (!this.bankAccountInfo.withdraw_type) {
this.$util.showToast({
title: '请先添加提现方式'
title: this.$lang('member.applyWithdrawal.pleaseAddWithdrawMethodFirst')
});
return;
}
@@ -188,7 +187,7 @@
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '提现申请成功'
title: this.$lang('member.applyWithdrawal.withdrawApplySuccess')
});
setTimeout(() => {
this.$util.redirectTo(
@@ -224,7 +223,7 @@
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '提现申请成功'
title: this.$lang('member.applyWithdrawal.withdrawApplySuccess')
});
setTimeout(() => {
this.$util.redirectTo('/pages_tool/member/withdrawal', {},

View File

@@ -37,13 +37,13 @@
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
</view>
<view class="balances-num">
<text :class="item.account_data > 0 ? 'color-base-text' : ''">{{ item.account_data > 0 ?
'+' + item.account_data : item.account_data }}元</text>
<text :class="item.account_data > 0 ? 'color-base-text' : ''">{{ (item.account_data > 0 ?
'+' + item.account_data : item.account_data) + $lang('yuan') }}</text>
</view>
</view>
</view>
</block>
<block v-else><ns-empty :isIndex="false" text="暂无余额明细"></ns-empty></block>
<block v-else><ns-empty :isIndex="false" :text="$lang('emptyTips')"></ns-empty></block>
<!-- 无明细列表 -->
</block>
</mescroll-uni>
@@ -62,13 +62,13 @@ export default {
return {
dataList: [],
statusList: [{
name: '全部',
name: this.$lang('filterAll'),
id: '0'
}, {
name: '收入',
name: this.$lang('filterIncome'),
id: '1'
}, {
name: '支出',
name: this.$lang('filterExpense'),
id: '2'
}],
scrollInto: '',
@@ -79,7 +79,7 @@ export default {
date: ''
},
balanceType: [{
label: '全部',
label: this.$lang('filterAll'),
value: '0'
}], //积分类型
balanceIndex: 0,
@@ -104,7 +104,7 @@ export default {
bindDateChange: function (e) {
var temp = e.target.value;
var tempArr = temp.split('-');
this.date = tempArr[0] + '年' + tempArr[1] + '月';
this.date = this.$lang('dateFormatYM', { year: tempArr[0], month: tempArr[1] });
this.searchType.date = e.target.value;
this.$refs.mescroll.refresh();
},
@@ -121,7 +121,7 @@ export default {
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}年${month}月`;
return this.$lang('dateFormatYM', { year, month });
},
bindPickerChange(e) {
this.balanceIndex = e.detail.value;
@@ -135,7 +135,7 @@ export default {
success: res => {
let balanceType = Object.assign(res.balance, res.balance_money),
typeArr = [{
label: '全部',
label: this.$lang('filterAll'),
value: '0'
}];
for (var index in balanceType) {

View File

@@ -5,16 +5,16 @@
<view class="cancelstatus-box">
<view class="cancelstatus-box-sort color-base-bg">1</view>
<view class="cancelstatus-box-con">
<view class="cancelstatus-box-name">提交申请</view>
<view class="cancelstatus-box-info">您已提交申请,请耐心等待~</view>
<view class="cancelstatus-box-name">{{ $lang('member.cancelStatus.step1Name') }}</view>
<view class="cancelstatus-box-info">{{ $lang('member.cancelStatus.step1Desc') }}</view>
</view>
<view class="cancelstatus-box-line color-base-bg"></view>
</view>
<view class="cancelstatus-box">
<view class="cancelstatus-box-sort color-base-bg">2</view>
<view class="cancelstatus-box-con">
<view class="cancelstatus-box-name">等待审核</view>
<view class="cancelstatus-box-info">等待审核中,审核通过后您的账号将直接被删除</view>
<view class="cancelstatus-box-name">{{ $lang('member.cancelStatus.step2Name') }}</view>
<view class="cancelstatus-box-info">{{ $lang('member.cancelStatus.step2Desc') }}</view>
</view>
<view class="cancelstatus-box-line color-base-bg" :class="{ 'opacity-4': state == 0 }"></view>
</view>
@@ -23,14 +23,14 @@
3
</view>
<view class="cancelstatus-box-con">
<view class="cancelstatus-box-name">审核通过,注销完成</view>
<view class="cancelstatus-box-info">您已成功注销账号,期待下一次与您相遇</view>
<view class="cancelstatus-box-name">{{ $lang('member.cancelStatus.step3Name') }}</view>
<view class="cancelstatus-box-info">{{ $lang('member.cancelStatus.step3Desc') }}</view>
</view>
</view>
</view>
<view class="cancelstatus-btn" v-if="state == 0">
<button type="primary" @click="back">返回</button>
<button class="color-base-bg" @click="revoke">撤销申请</button>
<button type="primary" @click="back">{{ $lang('member.cancelStatus.back') }}</button>
<button class="color-base-bg" @click="revoke">{{ $lang('member.cancelStatus.revokeApplication') }}</button>
</view>
</view>
</view>
@@ -81,8 +81,8 @@
},
revoke() {
uni.showModal({
title: '风险提示',
content: '确定要撤销申请吗?',
title: this.$lang('member.cancelStatus.riskTip'),
content: this.$lang('member.cancelStatus.revokeConfirm'),
confirmColor: '#000000',
success: res => {
if (res.confirm) {