feat: 中文参数从zh改为cn
This commit is contained in:
@@ -3,10 +3,10 @@ import router from './index'
|
|||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
const path = to.path
|
const path = to.path
|
||||||
const list = {
|
const list = {
|
||||||
zh: 'CHINESE_SIMPLIFIED',
|
cn: 'CHINESE_SIMPLIFIED',
|
||||||
en: 'ENGLISH'
|
en: 'ENGLISH'
|
||||||
}
|
}
|
||||||
if (path.startsWith('/zh') || (to.params.lang === 'zh')) {
|
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 if (path.startsWith('/en') || (to.params.lang === 'en')) {
|
||||||
localStorage.setItem('loginLanguage', 'ENGLISH')
|
localStorage.setItem('loginLanguage', 'ENGLISH')
|
||||||
|
|||||||
Reference in New Issue
Block a user