feat: 新增多语言国际化页面配置,修复部分页面硬编码文案

1. 新增了zh-cn和en-us两套语言下的大量页面国际化配置文件,覆盖商品、订单、会员、营销活动等多个业务模块
2. 修复了分销页面、VR页面、支付页面、商品不存在页面的硬编码提示文案,替换为国际化调用
3. 删除了原有的i18n检查脚本文件
This commit is contained in:
2026-06-25 11:00:50 +08:00
parent 5f41febd70
commit 8e218bb663
509 changed files with 49155 additions and 55313 deletions

View File

@@ -50,7 +50,7 @@
</view>
<view :class="['box', 'box-flex', 'align-right']">
<text v-if="item.val != ''">{{ item.val }}</text>
<text v-else class="color-tip">{{ item.value.placeholder || $lang('common.ns-form.l37.t0') }}</text>
<text v-else class="color-tip">{{ item.value.placeholder || '请选择' }}</text>
<text class="iconfont icon-right"></text>
</view>
</view>
@@ -146,7 +146,7 @@
@change="bindDateChange($event, index)"
>
<view :class="['uni-input', !item.val ? 'color-tip' : '']">
{{ item.val ? item.val : (item.value.placeholder || $lang('common.ns-newform.l149.t0')) }}
{{ item.val ? item.val : (item.value.placeholder || '请选择日期') }}
</view>
</picker>
<text class="iconfont icon-right"></text>
@@ -170,7 +170,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.start_date ? 'color-tip' : '']">
{{ item.start_date ? item.start_date : (item.value.placeholder_start || $lang('common.ns-newform.l173.t0')) }}
{{ item.start_date ? item.start_date : (item.value.placeholder_start || '开始日期') }}
</view>
</view>
</picker>
@@ -184,7 +184,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.end_date ? 'color-tip' : '']">
{{ item.end_date ? item.end_date : (item.value.placeholder_end || $lang('common.ns-newform.l187.t0')) }}
{{ item.end_date ? item.end_date : (item.value.placeholder_end || '结束日期') }}
</view>
</view>
</picker>
@@ -207,7 +207,7 @@
@change="bindTimeChange($event, index)"
>
<view :class="['uni-input', !item.val ? 'color-tip' : '']">
{{ item.val ? item.val : (item.value.placeholder || $lang('common.ns-newform.l210.t0')) }}
{{ item.val ? item.val : (item.value.placeholder || '请选择时间') }}
</view>
</picker>
<text class="iconfont icon-right"></text>
@@ -231,7 +231,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.start_time ? 'color-tip' : '']">
{{ item.start_time ? item.start_time : (item.value.placeholder_start || $lang('common.ns-newform.l234.t0')) }}
{{ item.start_time ? item.start_time : (item.value.placeholder_start || '开始时间') }}
</view>
</view>
</picker>
@@ -245,7 +245,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.end_time ? 'color-tip' : '']">
{{ item.end_time ? item.end_time : (item.value.placeholder_end || $lang('common.ns-newform.l248.t0')) }}
{{ item.end_time ? item.end_time : (item.value.placeholder_end || '结束时间') }}
</view>
</view>
</picker>
@@ -268,7 +268,7 @@
@getRegions="handleGetRegions($event, index)"
>
<view :class="['select-address', !item.val ? 'empty' : '', !item.val ? 'color-tip' : '']">
{{ item.val ? item.val : (item.value.placeholder || (item.value.default_type == 1 ? '请选择省市' : $lang('common.ns-newform.l271.t0'))) }}
{{ item.val ? item.val : (item.value.placeholder || (item.value.default_type == 1 ? '请选择省市' : '请选择省市区')) }}
</view>
</pick-regions>
<text class="iconfont icon-right"></text>
@@ -788,89 +788,89 @@ export default {
if (item.controller == 'Text') {
if (item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l368.t0') + item.value.title });
this.$util.showToast({ title: '请输入' + item.value.title });
return false;
}
if (item.name == 'ID_CARD' && !/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(item.val)) {
if (!item.value.required) {
this.$util.showToast({ title: $lang('common.ns-form.l378.t0') });
this.$util.showToast({ title: '身份证输入不合法' });
return false;
}
if (item.val != '') {
this.$util.showToast({ title: $lang('common.ns-form.l378.t0') });
this.$util.showToast({ title: '身份证输入不合法' });
return false;
}
}
if (item.name == 'MOBILE' && !this.$util.verifyMobile(item.val)) {
if (!item.value.required) {
this.$util.showToast({ title: $lang('common.ns-form.l395.t0') });
this.$util.showToast({ title: '手机号输入不合法' });
return false;
}
if (item.val != '') {
this.$util.showToast({ title: $lang('common.ns-form.l395.t0') });
this.$util.showToast({ title: '手机号输入不合法' });
return false;
}
}
}
if (item.controller == 'Textarea' && item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l368.t0') + item.value.title });
this.$util.showToast({ title: '请输入' + item.value.title });
return false;
}
if (item.controller == 'Select' && item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l37.t0') + item.value.title });
this.$util.showToast({ title: '请选择' + item.value.title });
return false;
}
if (item.controller == 'Checkbox' && item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l432.t0') + item.value.title });
this.$util.showToast({ title: '请至少选择一个' + item.value.title });
return false;
}
if (item.controller == 'Img' && item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l442.t0') + item.value.title });
this.$util.showToast({ title: '请至少上传一张' + item.value.title });
return false;
}
if (item.controller == 'Date' && item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l37.t0') + item.value.title });
this.$util.showToast({ title: '请选择' + item.value.title });
return false;
}
if (item.controller == 'Datelimit') {
if (item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l37.t0') + item.value.title });
this.$util.showToast({ title: '请选择' + item.value.title });
return false;
}
if (this.$util.timeTurnTimeStamp(item.start_date) > this.$util.timeTurnTimeStamp(item.end_date)) {
this.$util.showToast({ title: $lang('common.ns-form.l470.t0') });
this.$util.showToast({ title: '结束日期不能小于开始日期' });
return false;
}
}
if (item.controller == 'Time' && item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l37.t0') + item.value.title });
this.$util.showToast({ title: '请选择' + item.value.title });
return false;
}
if (item.controller == 'Timelimit') {
if (item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l37.t0') + item.value.title });
this.$util.showToast({ title: '请选择' + item.value.title });
return false;
}
if (item.start_time >= item.end_time) {
this.$util.showToast({ title: $lang('common.ns-form.l498.t0') });
this.$util.showToast({ title: '结束时间必须大于开始时间' });
return false;
}
}
if (item.controller == 'City' && item.value.required && !item.val) {
this.$util.showToast({ title: $lang('common.ns-form.l37.t0') + item.value.title });
this.$util.showToast({ title: '请选择' + item.value.title });
return false;
}
}
@@ -902,7 +902,7 @@ export default {
if (res.length > 0) {
res.forEach(function(img) {
if (self.formData[index].img_lists.length >= Number(self.formData[index].value.max_count)) {
self.$util.showToast({ title: $lang('common.ns-form.l545.t0') + self.formData[index].value.max_count + $lang('common.ns-form.l545.t1') });
self.$util.showToast({ title: '最多上传' + self.formData[index].value.max_count + '张图片' });
return false;
}
self.formData[index].img_lists.push(img);
@@ -916,7 +916,7 @@ export default {
addImg(index) {
let self = this;
if (this.formData[index].img_lists.length >= Number(this.formData[index].value.max_count)) {
this.$util.showToast({ title: $lang('common.ns-form.l545.t0') + this.formData[index].value.max_count + $lang('common.ns-form.l545.t1') });
this.$util.showToast({ title: '最多上传' + this.formData[index].value.max_count + '张图片' });
return false;
}