From daaafac7f8f40f2af8bd0a47a093e8ed332d3fe4 Mon Sep 17 00:00:00 2001 From: lyt <1105290566@qq.com> Date: Sat, 8 May 2021 11:36:07 +0800 Subject: [PATCH] =?UTF-8?q?'admin-21.05.08:=E4=BF=AE=E5=A4=8D=E7=B2=98?= =?UTF-8?q?=E8=B4=B4=E5=A4=8D=E5=88=B6=E7=9A=84=E9=93=BE=E6=8E=A5=EF=BC=8C?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8E=E4=B8=8D=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E9=93=BE=E6=8E=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 2 +- src/views/login/component/account.vue | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 7aa7a4d..77f8d72 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1079,7 +1079,7 @@ router.beforeEach((to, from, next) => { NProgress.done(); } else { if (!token) { - next('/login'); + next(`/login?redirect=${to.path}`); clearSession(); resetRoute(); NProgress.done(); diff --git a/src/views/login/component/account.vue b/src/views/login/component/account.vue index e7c8646..6ed078a 100644 --- a/src/views/login/component/account.vue +++ b/src/views/login/component/account.vue @@ -52,7 +52,7 @@