🐛修改未登录访问需要登录的资源,在登录后重定向丢失请求参数问题

This commit is contained in:
不做码农 2023-09-08 18:32:27 +08:00
parent 05fdc8d4a2
commit fc3bcbf225

View File

@ -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()
} }
} }