diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 1800836a..9268d926 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -175,8 +175,8 @@ export default { } else { this.$router.push(`/login`) } - this.$i18n.locale = 'zh' - this.setLanguage('zh') + // //this.$i18n.locale = 'zh' + // //this.setLanguage('zh') this.$updateDictionary() }, editInfo() { diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 51cb716c..07cfc266 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -282,7 +282,9 @@ const actions = { }) resetRouter() removeName() + let lang = zzSessionStorage.getItem('lang') zzSessionStorage.clear() + zzSessionStorage.setItem('lang', lang) commit('RESET_STATE') } catch (e) { console.log(e) diff --git a/src/utils/request-download.js b/src/utils/request-download.js index 90bf9d29..03ab1808 100644 --- a/src/utils/request-download.js +++ b/src/utils/request-download.js @@ -89,9 +89,9 @@ service.interceptors.response.use( }) store.dispatch('user/logout').then(() => { router.push(`/login`) - this.$i18n.locale = 'zh' - this.setLanguage('zh') - this.$updateDictionary() + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') + // this.$updateDictionary() }) } } else { diff --git a/src/utils/request.js b/src/utils/request.js index a42d08a0..a8d5e132 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -100,9 +100,11 @@ service.interceptors.response.use( console.log(err) } router.push(`/login`) - this.$i18n.locale = 'zh' - this.setLanguage('zh') - this.$updateDictionary() + // if (!this.$i18n.locale) { + // //this.$i18n.locale = 'zh' + // //this.setLanguage('zh') + // } + // this.$updateDictionary() }) } switch (status) { @@ -132,9 +134,9 @@ service.interceptors.response.use( } store.dispatch('user/logout').then(() => { router.push(`/login`) - this.$i18n.locale = 'zh' - this.setLanguage('zh') - this.$updateDictionary() + // //this.$i18n.locale = 'zh' + // //this.setLanguage('zh') + // this.$updateDictionary() }) } else { setTimer({ diff --git a/src/views/blindResumeInfo/info.vue b/src/views/blindResumeInfo/info.vue index 2c2305e2..1fd40263 100644 --- a/src/views/blindResumeInfo/info.vue +++ b/src/views/blindResumeInfo/info.vue @@ -86,8 +86,8 @@ export default { this.setLanguage('en') this.$updateDictionary() } else { - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') this.$updateDictionary() } this.title = this.doctorInfo.BasicInfoView?`${this.doctorInfo.BasicInfoView.BlindName}${this.$t('resumeInfo:title:Details')}`:'' diff --git a/src/views/dashboard/bigdata.vue b/src/views/dashboard/bigdata.vue index e551f087..adbfc643 100644 --- a/src/views/dashboard/bigdata.vue +++ b/src/views/dashboard/bigdata.vue @@ -131,8 +131,8 @@ export default { .then(() => { this.$store.dispatch('user/logout').then(res => { this.$router.push(`/login`) - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') this.$updateDictionary() }) }) diff --git a/src/views/email-recompose/index.vue b/src/views/email-recompose/index.vue index 49e12126..7e3e8f42 100644 --- a/src/views/email-recompose/index.vue +++ b/src/views/email-recompose/index.vue @@ -195,8 +195,8 @@ export default { this.$router.push(`/login`) } if (!this.$i18n.locale) { - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') } this.$updateDictionary() }, diff --git a/src/views/recompose/index.vue b/src/views/recompose/index.vue index 7f43ecbb..da7365e4 100644 --- a/src/views/recompose/index.vue +++ b/src/views/recompose/index.vue @@ -145,8 +145,8 @@ export default { this.$router.push(`/login`) } if (!this.$i18n.locale) { - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') } this.$updateDictionary() }, diff --git a/src/views/resumeInfo/index.vue b/src/views/resumeInfo/index.vue index 3a801144..50c565c1 100644 --- a/src/views/resumeInfo/index.vue +++ b/src/views/resumeInfo/index.vue @@ -98,8 +98,8 @@ export default { this.setLanguage('en') this.$updateDictionary() } else { - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') this.$updateDictionary() } this.title =this.doctorInfo.BasicInfoView?`${this.doctorInfo.BasicInfoView.FirstName} ${this.doctorInfo.BasicInfoView.LastName}${this.$t('resumeInfo:title:Details')}`:'' diff --git a/src/views/trials/trials-layout/components/trialsNavbar.vue b/src/views/trials/trials-layout/components/trialsNavbar.vue index ee4f3ba0..c5c47cc9 100644 --- a/src/views/trials/trials-layout/components/trialsNavbar.vue +++ b/src/views/trials/trials-layout/components/trialsNavbar.vue @@ -221,8 +221,8 @@ export default { async logout() { await this.$store.dispatch('user/logout') this.$router.push(`/login`) - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') this.$updateDictionary() }, go(value) { diff --git a/src/views/trials/trials-myinfo/account.vue b/src/views/trials/trials-myinfo/account.vue index 401dcaa3..feb9161b 100644 --- a/src/views/trials/trials-myinfo/account.vue +++ b/src/views/trials/trials-myinfo/account.vue @@ -333,8 +333,8 @@ export default { } else { this.$router.push(`/login`) } - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') this.$updateDictionary() }, }, diff --git a/src/views/trials/trials-myinfo/password.vue b/src/views/trials/trials-myinfo/password.vue index 8779f816..f16a0569 100644 --- a/src/views/trials/trials-myinfo/password.vue +++ b/src/views/trials/trials-myinfo/password.vue @@ -151,8 +151,8 @@ export default { } else { this.$router.push(`/login`) } - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') this.$updateDictionary() }, }, diff --git a/src/views/user/myInfo.vue b/src/views/user/myInfo.vue index 94561ea4..17ccc97b 100644 --- a/src/views/user/myInfo.vue +++ b/src/views/user/myInfo.vue @@ -569,8 +569,8 @@ export default { } else { this.$router.push(`/login`) } - this.$i18n.locale = 'zh' - this.setLanguage('zh') + //this.$i18n.locale = 'zh' + //this.setLanguage('zh') this.$updateDictionary() }, },