From 1955e9180056e2608d26cdad67e4f2739eced35e Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Wed, 27 Aug 2025 17:24:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(router):=20=E5=9C=A8=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E5=99=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84return=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 防止在不需要登录的情况下继续执行后续逻辑 --- src/router/interceptor.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/router/interceptor.ts b/src/router/interceptor.ts index bd30736..dd1a59b 100644 --- a/src/router/interceptor.ts +++ b/src/router/interceptor.ts @@ -61,6 +61,7 @@ export const navigateToInterceptor = { else { console.log('isNeedLogin redirectUrl:', redirectUrl) uni.navigateTo({ url: redirectUrl }) + return } } } @@ -71,6 +72,7 @@ export const navigateToInterceptor = { if (EXCLUDE_PAGE_LIST.includes(path)) { console.log('isNeedLogin redirectUrl:', redirectUrl) uni.navigateTo({ url: redirectUrl }) + return } } // #endregion 2/2 不需要登录的情况 ---------------------------