Explorar el Código

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

修正小程序环境下登录页面路由拦截的条件判断,将LOGIN_PAGE_ENABLE_IN_MP取反以确保逻辑正确
feige996 hace 7 meses
padre
commit
e8859159a2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/router/interceptor.ts

+ 1 - 1
src/router/interceptor.ts

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