diff --git a/common/js/diy.js b/common/js/diy.js index ab4a29f..539e0fc 100644 --- a/common/js/diy.js +++ b/common/js/diy.js @@ -334,7 +334,11 @@ export default { let diyDataValue = res.data; if (diyDataValue.value) { this.diyData = JSON.parse(diyDataValue.value); - this.$langConfig.title(this.diyData.global.title); + + // 导航栏标题要根据语言环境切换 + const title = this.isEnEnv ? this.diyData?.global?.en_title : this.diyData?.global?.title; + if (title) this.$langConfig.title(title); + this.mpCollect = this.diyData.global.mpCollect; this.setPublicShare(); /* if (this.diyData.global.popWindow && this.diyData.global.popWindow.imageUrl) { diff --git a/common/js/lang.js b/common/js/lang.js index e023594..a39e48a 100644 --- a/common/js/lang.js +++ b/common/js/lang.js @@ -92,6 +92,8 @@ export default { } } if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field + + console.log(`字段: ${field}, 值: ${value}`) return value; }, /** diff --git a/pages/goods/category.vue b/pages/goods/category.vue index e1daf22..e316c24 100644 --- a/pages/goods/category.vue +++ b/pages/goods/category.vue @@ -26,99 +26,101 @@ \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 760086d..3a25fbd 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,7 +1,8 @@