From 92e7ada37bee8a719ad4c2dcd1a1e163cf8fa529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BC=A0=E9=BE=99?= Date: Sat, 24 Sep 2022 15:40:34 +0800 Subject: [PATCH] fix: toLogin --- src/utils/auth/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } : {}, }) }