bugfix: 验证码输入状态
feat: 接收语言参数
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
import router from './index'
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
next()
|
||||
const path = to.path
|
||||
const list = {
|
||||
zh: 'CHINESE_SIMPLIFIED',
|
||||
en: 'ENGLISH'
|
||||
}
|
||||
if (path.startsWith('/zh') || (to.params.lang === 'zh')) {
|
||||
localStorage.setItem('loginLanguage', 'CHINESE_SIMPLIFIED')
|
||||
} else if (path.startsWith('/en') || (to.params.lang === 'en')) {
|
||||
localStorage.setItem('loginLanguage', 'ENGLISH')
|
||||
}
|
||||
|
||||
next()
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user