From 6cd9fe9134a60dc168d5039aa584797c16373fdb Mon Sep 17 00:00:00 2001 From: PDieE <23275429@qq.com> Date: Fri, 9 Dec 2022 09:51:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=94=AF=E6=8C=81=E5=9B=9E=E8=B7=B3=E5=B8=A6?= =?UTF-8?q?query=E5=8F=82=E6=95=B0=E7=9A=84=E9=A1=B5=E9=9D=A2=20(#374)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/Header.vue | 5 ++++- src/pages/login/components/Login.vue | 9 +++++---- src/permission.ts | 10 ++++++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/layouts/components/Header.vue b/src/layouts/components/Header.vue index 0addb72..b302afe 100644 --- a/src/layouts/components/Header.vue +++ b/src/layouts/components/Header.vue @@ -143,7 +143,10 @@ const handleNav = (url) => { }; const handleLogout = () => { - router.push(`/login?redirect=${router.currentRoute.value.fullPath}`); + router.push({ + path: '/login', + query: { redirect: encodeURIComponent(router.currentRoute.value.fullPath) }, + }); }; const navToGitHub = () => { diff --git a/src/pages/login/components/Login.vue b/src/pages/login/components/Login.vue index ad52baa..f5938a4 100644 --- a/src/pages/login/components/Login.vue +++ b/src/pages/login/components/Login.vue @@ -80,7 +80,7 @@