feat: 不再缓存语言,不带/cn就用英文
This commit is contained in:
@@ -8,7 +8,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
}
|
}
|
||||||
if (path.startsWith('/cn') || (to.params.lang === 'cn')) {
|
if (path.startsWith('/cn') || (to.params.lang === 'cn')) {
|
||||||
localStorage.setItem('loginLanguage', 'CHINESE_SIMPLIFIED')
|
localStorage.setItem('loginLanguage', 'CHINESE_SIMPLIFIED')
|
||||||
} else if (path.startsWith('/en') || (to.params.lang === 'en')) {
|
} else {
|
||||||
localStorage.setItem('loginLanguage', 'ENGLISH')
|
localStorage.setItem('loginLanguage', 'ENGLISH')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user