fix: 修复语言设置逻辑问题

This commit is contained in:
chenjinsong
2023-08-09 18:32:52 +08:00
parent 00ab7e5991
commit 1d9214a5a1
4 changed files with 11 additions and 19 deletions

View File

@@ -22,9 +22,7 @@ router.beforeEach(async (to, from, next) => {
}
if (localStorage.getItem(storageKey.token)) {
// 加载i18n
if (!localStorage.getItem(storageKey.i18n)) {
await loadI18n()
}
await loadI18n()
// 加载权限
if (permissionWhiteList.indexOf(to.path) !== -1) {
next()