🐛修改未登录访问需要登录的资源,在登录后重定向丢失请求参数问题
This commit is contained in:
parent
05fdc8d4a2
commit
fc3bcbf225
@ -56,7 +56,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
console.log('to login')
|
console.log('to login')
|
||||||
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
|
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user