在promission.js 里判断
import { router } from '@/router'
import { userService } from './service/userService'
const { userInfo, getUserInfo } = userService()
router.beforeEach(async ({ query, meta, name }, from, next) => {
document.title = meta.title
if (!window.localStorage.getItem('lang')) {
// i18n inquiryService promiss
// window.localStorage.setItem('lang', 'en') // 缅甸
window.localStorage.setItem('lang', 'vi') //越南
}
if (meta.noRequiresAuth) {
next()
}
})