feat: 新增多语言文案与组件国际化适配

本次提交完成了大量多语言相关的新增与优化工作:
1. 新增充值、案例、会员资产、订单等页面的中文/英文翻译文案
2. 新增企业微信客服、时间选择、支付弹窗等组件的多语言包
3. 优化工具函数与自定义页面的多语言适配,替换硬编码提示文案
4. 新增会员等级规则、积分商品、退款管理等页面的国际化支持
5. 修复企业微信JS-SDK的错误提示文案硬编码问题
This commit is contained in:
2026-06-26 09:09:46 +08:00
parent 2d8846c64c
commit 066ca61d97
97 changed files with 2704 additions and 716 deletions

View File

@@ -73,7 +73,7 @@
<!-- 企业文件 -->
<view class="view_files_container" v-if="showFileListDiy && fileList.length > 0">
<view class="section-title">企业文件</view>
<view class="section-title">{{ $lang('enterpriseFiles') }}</view>
<view class="files-list">
<view v-for="(file, index) in fileList" :key="index" class="file-item">
<image mode="aspectFill" :src="$util.img('public/static/img/pdf-icon.png')"
@@ -90,7 +90,7 @@
</view>
<!-- 企业视频 -->
<view class="view_videos_container" v-if="showVideoListDiy && videoList.length > 0">
<view class="section-title">企业视频</view>
<view class="section-title">{{ $lang('enterpriseVideos') }}</view>
<view class="videos-list">
<view v-for="(video, index) in videoList" :key="index" class="video-item"
@click="playVideo(video)">
@@ -311,11 +311,11 @@ export default {
// 如果后台没配置,用默认值
this.mpShareData = {
appMessage: {
title: '联系我们',
title: this.$lang('contactUs'),
path: '/pages_tool/contact/contact'
},
timeLine: {
title: '联系我们',
title: this.$lang('contactUs'),
query: ''
}
};
@@ -351,7 +351,7 @@ export default {
this.currentVideo = video;
this.$refs.videoPlayerPopup.open();
} else {
uni.showToast({ title: '视频地址不存在', icon: 'none' });
uni.showToast({ title: this.$lang('videoUrlNotExist'), icon: 'none' });
}
},
@@ -369,22 +369,22 @@ export default {
},
save() {
if (!this.Form.realname.trim()) {
uni.showToast({ title: '请填写姓名', icon: 'none' });
uni.showToast({ title: this.$lang('pleaseFillName'), icon: 'none' });
return;
}
if (!this.Form.mobile || !/^1[3-9]\d{9}$/.test(this.Form.mobile)) {
uni.showToast({ title: '手机号格式不正确', icon: 'none' });
uni.showToast({ title: this.$lang('invalidMobileFormat'), icon: 'none' });
return;
}
if (!this.Form.remark.trim()) {
uni.showToast({ title: '请填写留言内容', icon: 'none' });
uni.showToast({ title: this.$lang('pleaseFillMessage'), icon: 'none' });
return;
}
this.$api.sendRequest({
url: '/api/member/message',
data: this.Form,
success: res => {
uni.showToast({ title: res.message || '提交成功', icon: 'success' });
uni.showToast({ title: res.message || this.$lang('submitSuccess'), icon: 'success' });
// 重置表单数据
@@ -402,7 +402,7 @@ export default {
// #endif
},
fail: () => {
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
uni.showToast({ title: this.$lang('submitFailed'), icon: 'none' });
}
});
},
@@ -471,19 +471,19 @@ export default {
},
onShareAppMessage() {
return this.mpShareData?.appMessage || {
title: '联系我们',
title: this.$lang('contactUs'),
path: '/pages_tool/contact/contact'
};
},
onShareTimeline() {
return this.mpShareData?.timeLine || {
title: '联系我们',
title: this.$lang('contactUs'),
query: ''
};
},
onAddToFavorites() {
return {
title: '联系我们',
title: this.$lang('contactUs'),
path: '/pages_tool/contact/contact'
};
},