ming vor 3 Jahren
Ursprung
Commit
2f49488107
4 geänderte Dateien mit 32 neuen und 8 gelöschten Zeilen
  1. 3 3
      public/static/config.js
  2. 11 0
      sh.exe.stackdump
  3. 12 0
      src/store/modules/routes.js
  4. 6 5
      src/utils/routes.js

+ 3 - 3
public/static/config.js

@@ -1,9 +1,9 @@
 // api 请求路径
 var PLATFROM_CONFIG = {};
-// PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
-// PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/" //超博本地
+PLATFROM_CONFIG.baseUrl = "http://172.16.120.104:8010/" //杨强本地
+    // PLATFROM_CONFIG.baseUrl = "http://172.16.1.196:8010/" //超博本地
 
-PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
+// PLATFROM_CONFIG.baseUrl = "https://qhome.usky.cn/fivapi/" //线上
 PLATFROM_CONFIG.images = "https://qhome.usky.cn/file/" //线上图片
 PLATFROM_CONFIG.fileUrl = "https://qhome.usky.cn/file/" //xlsx文件访问路径
 

+ 11 - 0
sh.exe.stackdump

@@ -0,0 +1,11 @@
+Stack trace:
+Frame        Function    Args
+000FFFFB540  00180064365 (00180275F10, 00180266FD1, 000FFFFCA60, 000FFFFBA20)
+000FFFFBA70  001800499D2 (00100002000, 0018034EB80, 00000000001, 00000000128)
+000FFFFCA80  00180049A11 (00000000001, 0018034EE90, 000FFFFCA60, 00000000008)
+000FFFFCB10  0018005CFCD (00000000000, 000FFFFCC40, 001800DC3EF, 00000000000)
+000FFFFCBF0  0018005D12B (000FFFFCDF0, 00000000000, FFFFFFFFFFFFFFD7, 00000000000)
+000FFFFCCE0  0018004A1A8 (00000000000, 00000000000, 00000000000, 00000000000)
+000FFFFCDA0  00180048A2A (00000000000, 00000000000, 00000000000, 00000000000)
+000FFFFCE50  00180048AEC (00000000000, 00000000000, 00000000000, 00000000000)
+End of stack trace

+ 12 - 0
src/store/modules/routes.js

@@ -43,6 +43,7 @@ const actions = {
      */
     async setAllRoutes({ commit }) {
         let { data } = await getRouterList()
+
         // let data = [
         //     {
         //         path: 'external-link',
@@ -71,6 +72,17 @@ const actions = {
         //         },]
         //     }
         // ]
+        data.unshift({
+            path: 'external-link',
+            component: 'Layout',
+            children: [{
+                path: '/home',
+                meta: { title: '首页', icon: 'home', }
+            }]
+        }, )
+
+        console.log('data')
+        console.log(data)
 
         if (data[data.length - 1].path !== '*')
             data.push({ path: '/*', redirect: '/404', hidden: true })

+ 6 - 5
src/utils/routes.js

@@ -18,7 +18,7 @@ export function convertRouter(constantRoutes) {
                 // route.component = (resolve) => require([`@/${path}`], resolve)
                 route.component = Layout
             } else {
-                console.log(route.component)
+                // console.log(route.component)
                 let path = route.component
                 if (
                     new RegExp('^/views/.*$').test(route.component) ||
@@ -31,13 +31,14 @@ export function convertRouter(constantRoutes) {
                     path = route.component.slice(1)
                 } else {
                     path = route.component.slice(8);
-                    console.log('path', path)
+                    // console.log('path', path)
                 }
 
                 // route.component = (resolve) => require([`@/views/alarmManage/index`], resolve)
-                route.component = () => import(`@/views/${path}`)
-                // route.component = () => import(`@/views/alarmManage/index`)
-                // console.log(route)
+                route.component = () =>
+                    import (`@/views/${path}`)
+                    // route.component = () => import(`@/views/alarmManage/index`)
+                    // console.log(route)
             }
         }
         if (route.children && route.children.length)