diff --git a/src/utils/auth/auth.js b/src/utils/auth/auth.js index afd7f7e..0e129cd 100644 --- a/src/utils/auth/auth.js +++ b/src/utils/auth/auth.js @@ -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 } : {}, }) }