fix: toLogin

This commit is contained in:
张传龙 2022-09-24 15:40:34 +08:00
parent 2d879d0592
commit 92e7ada37b

View File

@ -5,7 +5,7 @@ export function toLogin() {
const needRedirect = !currentRoute.meta.requireAuth && !['/404', '/login'].includes(router.currentRoute.value.path)
router.replace({
path: '/login',
query: needRedirect ? { ...router.currentRoute.value.query, redirect: router.currentRoute.value.path } : {},
query: needRedirect ? { ...currentRoute.query, redirect: currentRoute.path } : {},
})
}