NEZ-1919 fix:已登录的用户 通过输入ip登录 偶尔会无法切换语言

This commit is contained in:
zhangyu
2022-06-10 15:51:52 +08:00
parent 0c42f064be
commit 95e965b5c6

View File

@@ -97,6 +97,10 @@ router.beforeEach((to, from, next) => {
}
})
if (!store.getters.i18nIsReady) {
const langList = localStorage.getItem('nz-language-list')
if (langList) {
store.commit('setLangList', JSON.parse(langList))
}
get(config.body.baseUrl + 'sys/i18n/lang').then(res => {
if (res.code === 200) {
loadI18n(res.data)