|
@@ -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
|
}
|