Bläddra i källkod

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

wjx 1 år sedan
förälder
incheckning
aadeb474de
1 ändrade filer med 9 tillägg och 0 borttagningar
  1. 9 0
      config/routerConfig.ts

+ 9 - 0
config/routerConfig.ts

@@ -23,6 +23,15 @@ function headrRouter(initialState: any, history: any) {
             }
         })
     }
+    if (history?.location?.pathname === '/launchSystemV3') { //当切换一级菜单的辅助跳转
+        history?.goBack()
+        initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {
+            if (item?.routes?.some((i: { path: string }) => i.path?.includes('/launchSystemV3'))) {
+                let path = item?.routes?.length > 0 ? (item?.routes[0]?.routes?.length > 0 && item?.routes[0]?.routes[0]?.path) ? item?.routes[0]?.routes[0]?.path : item?.routes[0].path : item?.routes[0].path
+                isPhone ? history.push(path) : window.open(location.origin + '/#' + path)
+            }
+        })
+    }
     if (history?.location?.pathname === '/toutiao') { //当切换一级菜单的辅助跳转
         history?.goBack()
         initialState?.menu?.data.forEach((item: { roles: string[], path: string, routes: { path: string, routes: any[] }[] }) => {