Browse Source

登录验证配置

庄逸洲 5 years ago
parent
commit
f33c965b77
2 changed files with 10 additions and 10 deletions
  1. 2 2
      config/index.js
  2. 8 8
      src/xt_permission.js

+ 2 - 2
config/index.js View File

19
 
19
 
20
     // host: 'test1.sgjyun.com',
20
     // host: 'test1.sgjyun.com',
21
     // host: 'jk.kuyicloud.com',
21
     // host: 'jk.kuyicloud.com',
22
-    //host: 'test1.sgjyun.com',
23
-    host:'localhost',
22
+    host: 'test1.sgjyun.com',
23
+    // host:'localhost',
24
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
25
     autoOpenBrowser: true,
25
     autoOpenBrowser: true,
26
     errorOverlay: true,
26
     errorOverlay: true,

+ 8 - 8
src/xt_permission.js View File

10
 
10
 
11
 router.beforeEach((to, from, next) => {
11
 router.beforeEach((to, from, next) => {
12
   // 线上注释
12
   // 线上注释
13
-  if (store.getters.permission_routers === undefined) {
14
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
15
-      next()
16
-    })
17
-  } else {
18
-    next()
19
-  }
20
-  return
13
+  // if (store.getters.permission_routers === undefined) {
14
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
15
+  //     next()
16
+  //   })
17
+  // } else {
18
+  //   next()
19
+  // }
20
+  // return
21
   // 线上注释
21
   // 线上注释
22
 
22
 
23
   NProgress.start()
23
   NProgress.start()