Ver Fonte

配置优化

quwangxin há 3 anos atrás
pai
commit
5e20a50e95
3 ficheiros alterados com 13 adições e 6 exclusões
  1. 4 3
      .env.sit
  2. 5 0
      src/micro-app.js
  3. 4 3
      src/store/modules/user.js

+ 4 - 3
.env.sit

@@ -1,6 +1,7 @@
 VUE_APP_API_BASE_URL=/api
 #VUE_APP_API_BASE_URL=http://localhost:8081/api
-VUE_APP_MAIN_DATA=http://192.168.3.51:86/
+VUE_APP_MAIN_DATA=http://192.168.3.51:86/main-data/
 
-VUE_APP_MES=http://localhost:8888/
-VUE_APP_EAM=http://localhost:7777/
+VUE_APP_MES=http://192.168.3.51:86/mes/
+VUE_APP_EAM=http://192.168.3.51:86/eam/
+VUE_APP_APS=http://192.168.3.51:86/aps/

+ 5 - 0
src/micro-app.js

@@ -14,6 +14,11 @@ const microApps = [
     name: 'eam',
     entry: process.env.VUE_APP_EAM,
     activeRule: '/eam'
+  },
+  {
+    name: 'aps',
+    entry: process.env.VUE_APP_APS,
+    activeRule: '/aps'
   }
 ];
 

+ 4 - 3
src/store/modules/user.js

@@ -11,9 +11,10 @@ const formatRouter = (list) => {
   const fn = (list, pPath = '') => {
     let arr = [];
     for (const p of list) {
-      p.path = pPath ? `${pPath}${p.path}` : p.path;
+      let curPath = pPath;
+      p.path = curPath ? `${curPath}${p.path}` : p.path;
       if (p.parentId === '0') {
-        pPath = p.path;
+        curPath = p.path;
       }
       p.component = '';
       if (p.menuType === 2) {
@@ -21,7 +22,7 @@ const formatRouter = (list) => {
         authorities.push(p);
       } else {
         if (p.children?.length) {
-          p.children = fn(p.children, pPath);
+          p.children = fn(p.children, curPath);
         } else {
           p.children = [];
         }