feat: 登录后跳转登录前页面

This commit is contained in:
chenjinsong
2022-04-13 10:14:36 +08:00
parent ea2f8724c2
commit 6537d88956
5 changed files with 56 additions and 16 deletions

View File

@@ -45,7 +45,7 @@ router.beforeEach(async (to, from, next) => {
if (loginWhiteList.indexOf(to.path) !== -1) {
next()
} else {
next({ path: '/login' })
next({ path: '/login', query: { redirect: to.fullPath } })
}
}
})