diff --git a/src/components/common/tail.vue b/src/components/common/tail.vue index 7558994..c152c69 100644 --- a/src/components/common/tail.vue +++ b/src/components/common/tail.vue @@ -7,10 +7,11 @@ /> -
+
- {{ characters == 1 ? "关注我们" : "follow Us" }} + + {{ characters == 1 ? "" : "" }}
-
-
+
+
{{ characters == 1 ? "联系我们" : "Contact us" }}
@@ -88,20 +91,7 @@ export default { charactersMy: 1, }; }, - watch: { - // languageLsit(newVal) { - // this.setCharacters([ - // { - // name: "Cn", - // value: 1 - // }, - // { - // name: "En", - // value: 2 - // } - // ]); - // } - }, + computed: { ...mapState({ characters: (state) => state.publicObj.characters, @@ -117,7 +107,7 @@ export default { this.$router.push(`/${path}`); }, goView(id) { - if (id == "Technology" || id == "Solutions") { + if (id == "Technology" || id == "Solutions" || id == "aboutUs") { this.$router.push(`/`); setTimeout(() => { document.querySelector("#" + id).scrollIntoView({ @@ -154,6 +144,29 @@ export default { }, created() { this.handleScrollTop(); + // this.charactersMy = this.$store.state.publicObj.characters; + // console.log(); + // console.log(this.charactersMy); + }, + watch: { + "$store.state.publicObj.characters": { + handler(newVal) { + console.log(newVal, "vuex"); + this.charactersMy = newVal; + }, + }, + // languageLsit(newVal) { + // this.setCharacters([ + // { + // name: "Cn", + // value: 1 + // }, + // { + // name: "En", + // value: 2 + // } + // ]); + // } }, }; diff --git a/src/components/home/home.vue b/src/components/home/home.vue index 903b14a..d901902 100644 --- a/src/components/home/home.vue +++ b/src/components/home/home.vue @@ -42,7 +42,11 @@ freely
-
+
{{ characters == 1 ? "立刻体验" : "Try it now" }}
@@ -162,13 +166,27 @@
-
-
+
+
{{ characters == 1 ? "立刻体验" : "Try it now" }}
-
-
+
+
{{ characters == 1 ? "立刻体验" : "Try it now" }}
@@ -225,7 +243,11 @@ }}
-
+
{{ characters == 1 ? "立刻体验" : "Try it now" }}
@@ -274,7 +296,11 @@ }}
-
+
{{ characters == 1 ? "了解详情" : "Read more" }}
@@ -920,18 +946,22 @@ export default { // 浏览器为IE的情况 if (Browser_Agent.indexOf(" MSIE ") != -1) { const a = navigator.browserLanguage; - if (a != "zh-cn") { - // 英文网站 - console.log("英文网站"); + if (a == "zh-cn") { + // 中文网站 + console.log("中文网站"); + this.setCharacters(1); + } else { this.setCharacters(2); } } // 浏览器非IE的情况 else { const b = navigator.language; - if (b != "zh-CN") { - // 英文网站 - console.log("英文网站"); + if (b == "zh-CN") { + // 中文网站 + console.log("中文网站"); + this.setCharacters(1); + } else { this.setCharacters(2); } } diff --git a/src/components/views/generate.vue b/src/components/views/generate.vue index fd905b5..7861876 100644 --- a/src/components/views/generate.vue +++ b/src/components/views/generate.vue @@ -1,6 +1,10 @@ diff --git a/src/components/views/live.vue b/src/components/views/live.vue index b507e64..8ce7dfa 100644 --- a/src/components/views/live.vue +++ b/src/components/views/live.vue @@ -1,10 +1,16 @@ diff --git a/src/components/views/shadow.vue b/src/components/views/shadow.vue index 02f29c7..9ff7757 100644 --- a/src/components/views/shadow.vue +++ b/src/components/views/shadow.vue @@ -1,6 +1,9 @@ diff --git a/src/components/views/turing.vue b/src/components/views/turing.vue index f311ea7..1901907 100644 --- a/src/components/views/turing.vue +++ b/src/components/views/turing.vue @@ -29,7 +29,11 @@ Easily create your unique digital IP
--> -
+
{{ characters == 1 ? "与李雷交谈" : "coming soon" }}
diff --git a/src/store/modules/public.js b/src/store/modules/public.js index ac9649f..6bf6177 100644 --- a/src/store/modules/public.js +++ b/src/store/modules/public.js @@ -1,6 +1,7 @@ let publicObj = { state: { characters: 1,//1=》中文 2=》英文 + showTryItNow: false }, mutations: { setCharacters(state, data) {