Sfoglia il codice sorgente

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

wjx 1 anno fa
parent
commit
8e21fcb008
2 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 9 0
      config/routerConfig.ts
  2. 1 1
      src/services/user.ts

+ 9 - 0
config/routerConfig.ts

@@ -32,6 +32,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)
+            }
+        })
+    }
 }
 //返回按钮路由
 function btnFun(items: any) {

+ 1 - 1
src/services/user.ts

@@ -16,7 +16,7 @@ export async function queryCurrent() {
 export async function getMenu(): Promise<any> {
   return request(api + '/erp/menu/getRouters', {
     method: 'PUT',
-    data: ["adq_put","ad_tt"]// "ad_monitor"
+    data: ["adq_put", "adq_put_v3", "ad_tt"]// "ad_monitor"
   })
 }