feat: add and optimize multilingual text resources

- add new language packs for multiple pages and components including category, cart, order, member center, distribution, etc.
- add Chinese and English translations for new features and UI text
- fix navigation service error message to use multilingual text
- update component templates to use dynamic language translation instead of hardcoded text
- adjust code indentation and formatting for consistency
This commit is contained in:
2026-06-26 13:49:26 +08:00
parent 66a579d48c
commit f7fb9f34f9
116 changed files with 1640 additions and 525 deletions

View File

@@ -1,7 +1,7 @@
/**
* 企业微信JS-SDK调用
*/
import langConfig from './lang.js';
import Lang from './lang.js';
let WxWork = function () {
// 企业微信JS-SDK
@@ -25,7 +25,7 @@ let WxWork = function () {
// H5环境下的企业微信
this.wxwork = WWOpenData;
} else {
console.error('企业微信JS-SDK未加载');
console.error(Lang.lang('wxworkJssdk.notLoaded'));
return false;
}
@@ -58,8 +58,8 @@ let WxWork = function () {
*/
this.addContact = function (params, success, fail) {
if (!this.wxwork) {
console.error('企业微信JS-SDK未初始化');
if (fail) fail(langConfig.lang('wxworkJssdk.notInitialized'));
console.error(Lang.lang('wxworkJssdk.notInitialized'));
if (fail) fail(Lang.lang('wxworkJssdk.notInitialized'));
return;
}
@@ -71,7 +71,7 @@ let WxWork = function () {
if (res.err_msg === 'openUserProfile:ok') {
if (success) success(res);
} else {
console.error('打开用户资料失败:', res);
console.error(Lang.lang('wxworkJssdk.openUserProfileFailed'), res);
if (fail) fail(res.err_msg);
}
});
@@ -89,8 +89,8 @@ let WxWork = function () {
*/
this.openCustomerService = function (params, success, fail) {
if (!this.wxwork) {
console.error('企业微信JS-SDK未初始化');
if (fail) fail(langConfig.lang('wxworkJssdk.notInitialized'));
console.error(Lang.lang('wxworkJssdk.notInitialized'));
if (fail) fail(Lang.lang('wxworkJssdk.notInitialized'));
return;
}