See999 5 년 전
부모
커밋
627b553251
3개의 변경된 파일28개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 2
      src/router/modules/scrm.js
  2. 1 1
      src/router/modules/slow.js
  3. 26 3
      src/store/modules/xt_permission.js

+ 1 - 2
src/router/modules/scrm.js 파일 보기

@@ -4,9 +4,8 @@ export default {
4 4
   path: '/scrm',
5 5
   component: Layout,
6 6
   redirct: 'noredirect',
7
-//   hidden:true,
8 7
   children: [{
9
-    path: process.env.SRCM_HOST,
8
+    path: '/scrm',
10 9
     name: 'scrm',
11 10
     meta: {
12 11
       title: 'scrm',

+ 1 - 1
src/router/modules/slow.js 파일 보기

@@ -5,7 +5,7 @@ export default {
5 5
   component: Layout,
6 6
   redirct: 'noredirect',
7 7
   children: [{
8
-    path: 'process.env.CDM_HOST',
8
+    path: '/slow',
9 9
     name: 'slow',
10 10
     meta: {
11 11
       title: 'slow',

+ 26 - 3
src/store/modules/xt_permission.js 파일 보기

@@ -41,12 +41,34 @@ function xt_filterAsyncRouter(routers) {
41 41
 }
42 42
 
43 43
 function setupRouters(urls) {
44
-  // console.log(urls)
44
+  console.log(urls)
45 45
   xt_asyncRouterMap.forEach(router => {
46
-    console.log(router)
46
+    // console.log(router)
47 47
     if (Object.prototype.toString.call(router.children) === '[object Array]') {
48 48
       router.hidden = true
49 49
       router.children.forEach(c_router => {
50
+        if(router.path == "/slow"){
51
+          if(IndexOf(urls, router.path) != -1){
52
+            router.hidden = false
53
+          }else{
54
+            router.hidden = true
55
+          }
56
+        }
57
+        if(router.path == "/scrm"){
58
+          if(IndexOf(urls, router.path) != -1){
59
+            router.hidden = false
60
+          }else{
61
+            router.hidden = true
62
+          }
63
+        }
64
+        if(router.path == "/shop"){
65
+          if(IndexOf(urls, router.path) != -1){
66
+            router.hidden = false
67
+          }else{
68
+            router.hidden = true
69
+          }
70
+        }
71
+
50 72
         // console.log(c_router.path)
51 73
         if (IndexOf(urls, c_router.path) !== -1) {
52 74
         // if (urls.indexOf(c_router.path) !== -1) {
@@ -57,11 +79,12 @@ function setupRouters(urls) {
57 79
           // console.log('router.children hide : ' + c_router.path)
58 80
           c_router.hidden = true
59 81
         }
82
+        
60 83
       })
61 84
     } else {
62 85
       router.hidden = true
63 86
       if (IndexOf(urls, router.path) !== -1) {
64
-        console.log('router show : ' + router.path)
87
+        // console.log('router show : ' + router.path)
65 88
       // if (urls.indexOf(router.path) !== -1) {
66 89
         router.hidden = false
67 90
       }