From c550a5370e24df81292994796905aebedb349061 Mon Sep 17 00:00:00 2001 From: ivamp Date: Sat, 25 May 2024 23:57:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/auth/Login.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/views/auth/Login.vue b/src/views/auth/Login.vue index e448318..c4396a4 100644 --- a/src/views/auth/Login.vue +++ b/src/views/auth/Login.vue @@ -38,9 +38,15 @@ function back() { }); } else { console.log("跳转:" + last_url); - router.push({ - path: last_url, - }); + + setTimeout(() => { + router.push({ + path: last_url ? last_url : "/", + }); + }, 100) + + // 不能这样做,因为会丢失登录状态。 + // window.location.href = window.location.origin + last_url } }