
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')
}
}
})
路由守卫
如果报错,看看这个配了吗
528
388

被折叠的 条评论
为什么被折叠?