diff --git a/src/App.vue b/src/App.vue index 8aa74b9..02b5729 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,6 +21,7 @@ export default defineComponent({ setup(){ console.log(i18ninit) const len = provideI18n(i18ninit); + len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage"); if(getValue('token')){ store.commit("login", true) store.dispatch("setUserInfo"); @@ -29,7 +30,6 @@ export default defineComponent({ console.log('ip') store.dispatch("getip"); store.commit('setWlan') - len.locale.value = !getValue("Lanvuage") ? 'zh' : getValue("Lanvuage"); router.push("/") } const zh = zhCN diff --git a/src/components/NavTop.vue b/src/components/NavTop.vue index 174d6fc..a7df2a5 100644 --- a/src/components/NavTop.vue +++ b/src/components/NavTop.vue @@ -320,14 +320,14 @@ export default defineComponent({ } function setlanguage(e?: any){ console.log(e) + saveValue("Lanvuage", e) if(store.state.islogin){ editsystemsetting({language:e}) }else { - saveValue("Lanvuage", e) location.reload(); // setLanvuage(e) } - lan.locale.value = e + // lan.locale.value = e } function toindex(){ diff --git a/src/views/login/About.vue b/src/views/login/About.vue index 39fd596..f93b099 100644 --- a/src/views/login/About.vue +++ b/src/views/login/About.vue @@ -124,6 +124,7 @@ import store from '@/store'; import router from '@/router'; import { useI18n } from '@/utils/i18n'; import { editsystemsetting, getlanguages } from '@/api'; +import { saveValue } from '@/utils/common'; export default defineComponent({ components: { NavBottom @@ -153,8 +154,13 @@ export default defineComponent({ } function setlanguage(e?: any){ console.log(e) - editsystemsetting({language:e}) - lan.locale.value = e + saveValue("Lanvuage", e) + if(store.state.islogin){ + editsystemsetting({language:e}) + }else { + location.reload(); + // setLanvuage(e) + } } return { languagelist, diff --git a/src/views/mine/Archives.vue b/src/views/mine/Archives.vue index ad15de1..078e2ac 100644 --- a/src/views/mine/Archives.vue +++ b/src/views/mine/Archives.vue @@ -229,7 +229,7 @@
{{ lan.$t("shoujihao") }}
-
{{ userinfo.mobile }}
+
{{ userinfo.code }}{{ userinfo.mobile }}
{{ lan.$t("genghuanshoujihao") }}