Преглед изворни кода

fix(router): 修复小程序登录页面路由拦截逻辑

修正小程序环境下登录页面路由拦截的条件判断,将LOGIN_PAGE_ENABLE_IN_MP取反以确保逻辑正确
feige996 пре 7 месеци
родитељ
комит
e8859159a2
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/router/interceptor.ts

+ 1 - 1
src/router/interceptor.ts

@@ -47,7 +47,7 @@ export const navigateToInterceptor = {
     tabbarStore.setAutoCurIdx(path)
 
     // 小程序里面使用平台自带的登录,则不走下面的逻辑
-    if (isMp && LOGIN_PAGE_ENABLE_IN_MP) {
+    if (isMp && !LOGIN_PAGE_ENABLE_IN_MP) {
       return true // 明确表示允许路由继续执行
     }