标签:navig 修改 from tac red break ror log product
提示信息:
router.beforeEach((to, from, next) => {
if (!storage.getItem(‘userInfo‘)) {
console.log(‘error‘)
next({ path: ‘/login‘ })
} else {
console.log(‘ok‘)
next()
}
})
router.beforeEach((to, from, next) => {
if (to.path === ‘/login‘) next()
if (!storage.getItem(‘userInfo‘)) {
next({ path: ‘/login‘ })
} else {
console.log(‘ok‘)
next()
}
})
标签:navig 修改 from tac red break ror log product
原文地址:https://www.cnblogs.com/lceihen/p/14855144.html