router.beforeEach((to, from, next) => {
if (to.path == '/drhkes') {
next()
} else {
var status = sessionStorage.getItem('logon')
if (status) {
next()
} else {
alert('请登录')
next('/drhkes')
}
}
})
路由守卫如果报错,看看这个配了吗
router.beforeEach((to, from, next) => {
if (to.path == '/drhkes') {
next()
} else {
var status = sessionStorage.getItem('logon')
if (status) {
next()
} else {
alert('请登录')
next('/drhkes')
}
}
})
路由守卫如果报错,看看这个配了吗