diff --git a/src/router/router-config.ts b/src/router/router-config.ts index 11d1714..af1ccc8 100644 --- a/src/router/router-config.ts +++ b/src/router/router-config.ts @@ -3,10 +3,10 @@ import router from './index' router.beforeEach((to, from, next) => { const path = to.path const list = { - zh: 'CHINESE_SIMPLIFIED', + cn: 'CHINESE_SIMPLIFIED', en: 'ENGLISH' } - if (path.startsWith('/zh') || (to.params.lang === 'zh')) { + if (path.startsWith('/cn') || (to.params.lang === 'cn')) { localStorage.setItem('loginLanguage', 'CHINESE_SIMPLIFIED') } else if (path.startsWith('/en') || (to.params.lang === 'en')) { localStorage.setItem('loginLanguage', 'ENGLISH')