xcroute.js 43 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740
import Vue from 'vue'
import Router from 'vue-router'
import * as Cookies from 'js-cookie'
Vue.use(Router)

const router = new Router({
        routes: [{
                    path: '/home',
                    component: resolve => require(['@/views/home'], resolve),
                    redirect: '/account',
                    children: [{
                            path: '/account',

                            component: resolve => require(['@/views/account/acc'], resolve),
                            children: [{
                                    path: '/',
                                    name: 'acc_daily',
                                    component: resolve => require(['@/views/account/daily'], resolve)
                                },
                                {
                                    path: '/account/weekly',
                                    name: 'acc_weekly',
                                    component: resolve => require(['@/views/account/weekly'], resolve),
                                },
                                {
                                    path: '/account/monthly',
                                    name: 'acc_monthly',
                                    component: resolve => require(['@/views/account/Monthly'], resolve),
                                },
                                {
                                    path: '/account/yearly',
                                    name: 'acc_yearly',
                                    component: resolve => require(['@/views/account/yearly'], resolve),
                                }
                            ]
                        },
                        {
                            path: '/mall',
                            component: resolve => require(['@/views/Mall/mall'], resolve),
                            children: [{
                                    path: '/',
                                    name: 'mall_daily',
                                    component: resolve => require(['@/views/Mall/daily'], resolve),
                                },
                                {
                                    path: '/mall/weekly',
                                    name: 'mall_weekly',
                                    component: resolve => require(['@/views/Mall/weekly'], resolve),
                                },
                                {
                                    path: '/mall/monthly',
                                    name: 'mall_monthly',
                                    component: resolve => require(['@/views/Mall/Monthly'], resolve),
                                },
                                {
                                    path: '/mall/yearly',
                                    name: 'mall_yearly',
                                    component: resolve => require(['@/views/Mall/yearly'], resolve),
                                }
                            ]
                        },
                        {
                            path: '/floor',
                            component: resolve => require(['@/views/Floor/floor'], resolve),
                            children: [{
                                    path: '/',
                                    name: 'floor_daily',
                                    component: resolve => require(['@/views/Floor/daily'], resolve),
                                },
                                {
                                    path: '/floor/weekly',
                                    name: 'floor_weekly',
                                    component: resolve => require(['@/views/Floor/weekly'], resolve),
                                },
                                {
                                    path: '/floor/monthly',
                                    name: 'floor_monthly',
                                    component: resolve => require(['@/views/Floor/Monthly'], resolve),
                                },
                                {
                                    path: '/floor/yearly',
                                    name: 'floor_yearly',
                                    component: resolve => require(['@/views/Floor/yearly'], resolve),
                                }
                            ]
                        },
                        {
                            path: '/shop',
                            component: resolve => require(['@/views/Shop/shop'], resolve),
                            children: [{
                                    path: '/',
                                    name: 'shop_daily',
                                    component: resolve => require(['@/views/Shop/daily'], resolve),
                                },
                                {
                                    path: '/shop/weekly',
                                    name: 'shop_weekly',
                                    component: resolve => require(['@/views/Shop/weekly'], resolve),
                                },
                                {
                                    path: '/shop/monthly',
                                    name: 'shop_monthly',
                                    component: resolve => require(['@/views/Shop/Monthly'], resolve),
                                },
                                {
                                    path: '/shop/yearly',
                                    name: 'shop_yearly',
                                    component: resolve => require(['@/views/Shop/yearly'], resolve),
                                }
                            ]
                        },
                        {
                            path: '/analysis',
                            component: resolve => require(['@/views/Analysis/analysis'], resolve),
                            children: [{
                                    path: '/analysis/seqasis',
                                    component: resolve => require(['@/views/Analysis/SeqAnalysis/seqanalysis'], resolve),
                                    children: [{
                                            path: 'daily',
                                            name: 'seq_daily',
                                            component: resolve => require(['@/views/Analysis/SeqAnalysis/daily'], resolve),
                                        },
                                        {
                                            path: 'weekly',
                                            name: 'seq_weekly',
                                            component: resolve => require(['@/views/Analysis/SeqAnalysis/weekly'], resolve),
                                        },
                                        {
                                            path: 'monthly',
                                            name: 'seq_monthly',
                                            component: resolve => require(['@/views/Analysis/SeqAnalysis/monthly'], resolve),
                                        },
                                        {
                                            path: 'yearly',
                                            name: 'seq_yearly',
                                            component: resolve => require(['@/views/Analysis/SeqAnalysis/yearly'], resolve),
                                        }
                                    ]
                                },
                                {
                                    path: '/analysis/mainstore',
                                    name: 'mainstore',
                                    component: resolve => require(['@/views/Analysis/MainStore/mainstore'], resolve),
                                    children: [{
                                        path: 'msreport',
                                        name: 'main_daily',
                                        component: resolve => require(['@/views/Analysis/MainStore/msreport'], resolve),
                                    }]
                                },
                                {
                                    path: '/analysis/timeheat',
                                    component: resolve => require(['@/views/Analysis/TimeHeat/timeheat'], resolve),
                                    children: [{
                                            path: 'weekly',
                                            name: 'timeheat_weekly',
                                            component: resolve => require(['@/views/Analysis/TimeHeat/weekly'], resolve),
                                        },
                                        {
                                            path: 'monthly',
                                            name: 'timeheat_monthly',
                                            component: resolve => require(['@/views/Analysis/TimeHeat/monthly'], resolve),
                                        },
                                        {
                                            path: 'yearly',
                                            name: 'timeheat_yearly',
                                            component: resolve => require(['@/views/Analysis/TimeHeat/yearly'], resolve),
                                        },
                                        {
                                            path: 'customly',
                                            name: 'timeheat_customly',
                                            component: resolve => require(['@/views/Analysis/TimeHeat/customly'], resolve),
                                        }
                                    ]
                                },
                                {
                                    path: '/analysis/weatherasis',
                                    component: resolve => require(['@/views/Analysis/WeatherAsis/weatherasis'], resolve),
                                    children: [{
                                            path: 'monthly',
                                            name: 'weather_monthly',
                                            component: resolve => require(['@/views/Analysis/WeatherAsis/monthly'], resolve),
                                        },
                                        {
                                            path: 'yearly',
                                            name: 'weather_yearly',
                                            component: resolve => require(['@/views/Analysis/WeatherAsis/yearly'], resolve),
                                        }
                                    ]
                                },
                                {
                                    path: '/analysis/holidayAsis',
                                    component: resolve => require(['@/views/Analysis/HolidayAct/Holiday/holiday'], resolve),
                                    children: [{
                                        path: 'yearly',
                                        name: 'holiday_yearly',
                                        component: resolve => require(['@/views/Analysis/HolidayAct/Holiday/yearly'], resolve),
                                    }]
                                },
                                {
                                    path: '/analysis/actAsis',
                                    component: resolve => require(['@/views/Analysis/HolidayAct/Activity/activity'], resolve),
                                    children: [{
                                        path: 'actday',
                                        name: 'act_day',
                                        component: resolve => require(['@/views/Analysis/HolidayAct/Activity/actday'], resolve),
                                    }]
                                },
                                {
                                    path: '/analysis/comprehen',
                                    component: resolve => require(['@/views/Analysis/Comprehen/comprehen'], resolve),
                                    children: [{
                                            path: 'daily',
                                            name: 'comprehen_daily',
                                            component: resolve => require(['@/views/Analysis/Comprehen/daily'], resolve),
                                        },
                                        {
                                            path: 'weekly',
                                            name: 'comprehen_weekly',
                                            component: resolve => require(['@/views/Analysis/Comprehen/weekly'], resolve),
                                        },
                                        {
                                            path: 'monthly',
                                            name: 'comprehen_monthly',
                                            component: resolve => require(['@/views/Analysis/Comprehen/monthly'], resolve),
                                        },
                                        {
                                            path: 'yearly',
                                            name: 'comprehen_yearly',
                                            component: resolve => require(['@/views/Analysis/Comprehen/yearly'], resolve),
                                        },
                                        {
                                            path: 'customly',
                                            name: 'comprehen_custom',
                                            component: resolve => require(['@/views/Analysis/Comprehen/customly'], resolve),
                                        }
                                    ]
                                },
                                {
                                    path: '/analysis/comtasis',
                                    component: resolve => require(['@/views/Analysis/CompareTime/compareTime'], resolve),
                                    children: [{
                                        path: 'contrast',
                                        name: 'comt_contrast',
                                        component: resolve => require(['@/views/Analysis/CompareTime/comtContrast'], resolve),
                                    }]
                                },
                                {
                                    path: '/analysis/weekComp',
                                    component: resolve => require(['@/views/Analysis/WeekComp/weekcomp'], resolve),
                                    children: [{
                                        path: 'wecomp',
                                        name: 'We_Comp',
                                        component: resolve => require(['@/views/Analysis/WeekComp/wecomp'], resolve),
                                    }]
                                },
                                {
                                    path: '/analysis/baseasis',
                                    component: resolve => require(['@/views/Analysis/BasicAsis/baseAsis'], resolve),
                                    children: [{
                                            path: 'daily',
                                            name: 'base_daily',
                                            component: resolve => require(['@/views/Analysis/BasicAsis/daily'], resolve),
                                        },
                                        {
                                            path: 'weekly',
                                            name: 'base_weekly',
                                            component: resolve => require(['@/views/Analysis/BasicAsis/weekly'], resolve),
                                        },
                                        {
                                            path: 'monthly',
                                            name: 'base_monthly',
                                            component: resolve => require(['@/views/Analysis/BasicAsis/monthly'], resolve),
                                        },
                                        {
                                            path: 'yearly',
                                            name: 'base_yearly',
                                            component: resolve => require(['@/views/Analysis/BasicAsis/yearly'], resolve),
                                        },
                                        {
                                            path: 'customly',
                                            name: 'base_custom',
                                            component: resolve => require(['@/views/Analysis/BasicAsis/customly'], resolve),
                                        }
                                    ]
                                },
                                {
                                    name: 'ioflow',
                                    path: '/analysis/ioflow',
                                    component: resolve => require(['@/views/Analysis/IoFlow/ioflow'], resolve),
                                    children: [{
                                            path: 'daily',
                                            name: 'ioflow_daily',
                                            component: resolve => require(['@/views/Analysis/IoFlow/daily'], resolve),
                                        },
                                        {
                                            path: 'weekly',
                                            name: 'ioflow_weekly',
                                            component: resolve => require(['@/views/Analysis/IoFlow/weekly'], resolve),
                                        },
                                        {
                                            path: 'monthly',
                                            name: 'ioflow_monthly',
                                            component: resolve => require(['@/views/Analysis/IoFlow/monthly'], resolve),
                                        },
                                        {
                                            path: 'yearly',
                                            name: 'ioflow_yearly',
                                            component: resolve => require(['@/views/Analysis/IoFlow/yearly'], resolve),
                                        },
                                        {
                                            path: 'customly',
                                            name: 'ioflow_customly',
                                            component: resolve => require(['@/views/Analysis/IoFlow/customly'], resolve),
                                        }
                                    ]
                                },
                                {
                                    name: 'rankasis',
                                    path: '/analysis/rankasis',
                                    component: resolve => require(['@/views/Analysis/RankAsis/rank'], resolve),
                                },
                                {
                                    path: '/analysis/storerate',
                                    name: 'storerate',
                                    component: resolve => require(['@/views/Analysis/StoreRate/storerateasis'], resolve),
                                    children: [{
                                        path: 'storeratio',
                                        name: 'storeratio',
                                        component: resolve => require(['@/views/Analysis/StoreRate/storeratio'], resolve),
                                    }]
                                },
                                {
                                    name: 'Timecomp',
                                    path: '/analysis/timecomp',
                                    component: resolve => require(['@/views/Analysis/timeComp/timec'], resolve),
                                },
                                {
                                    name: 'pointheat',
                                    path: '/analysis/pointheat',
                                    component: resolve => require(['@/views/Analysis/newPointHeat/newtrafficheat'], resolve),
                                },
                                {
                                    name: 'trafficdensity',
                                    path: '/analysis/trafficdensity',
                                    component: resolve => require(['@/views/Analysis/TrafficDensity/trafficdensity'], resolve),
                                },
                                {
                                    name: 'floortrafficheat',
                                    path: '/analysis/floortrafficheat',
                                    component: resolve => require(['@/views/Analysis/FloorTrafficHeat/floortrafficheat'], resolve),
                                },
                                {
                                    name: 'floorponit',
                                    path: '/analysis/floorpoint',
                                    component: resolve => require(['@/views/Analysis/FloorTrafficHeat/floorpoint'], resolve),
                                },
                                {
                                    name: 'floorheatmap',
                                    path: '/analysis/floorheatmap',
                                    component: resolve => require(['@/views/Analysis/FloorHeat/heatmap'], resolve),
                                    children: [{
                                        path: 'floorheatmap',
                                        name: 'floorheatmap',
                                        component: resolve => require(['@/views/Analysis/FloorHeat/floorheatmap'], resolve),
                                    }]
                                },
                                {
                                    path: '/analysis/trafficeline',
                                    name: 'trafficeline',
                                    component: resolve => require(['@/views/Analysis/MovingLine/moveline'], resolve),
                                    children: [{
                                            path: 'daily',
                                            name: 'ml_daily',
                                            component: resolve => require(['@/views/Analysis/MovingLine/daily'], resolve),
                                        },
                                        {
                                            path: 'weekly',
                                            name: 'ml_weekly',
                                            component: resolve => require(['@/views/Analysis/MovingLine/weekly'], resolve),
                                        }, {
                                            path: 'monthly',
                                            name: 'ml_monthly',
                                            component: resolve => require(['@/views/Analysis/MovingLine/monthly'], resolve),
                                        }, {
                                            path: 'yearly',
                                            name: 'ml_yearly',
                                            component: resolve => require(['@/views/Analysis/MovingLine/yearly'], resolve),
                                        }, {
                                            path: 'customly',
                                            name: 'ml_custom',
                                            component: resolve => require(['@/views/Analysis/MovingLine/customly'], resolve),
                                        }
                                    ]
                                },
                                {
                                    path: '/analysis/blocarea',
                                    name: 'blocarea',
                                    component: resolve => require(['@/views/Analysis/BlocArea/blocAreaAsis'], resolve)
                                }
                            ]
                        },
                        {
                            path: '/behavior',
                            component: resolve => require(['@/views/Behavior/behavior'], resolve),
                            children: [{
                                    path: 'capturecamera',
                                    name: 'capturecamera',
                                    component: resolve => require(['@/views/Behavior/camera'], resolve),
                                }, {
                                    path: 'clerkcamera',
                                    name: 'clerkcamera',
                                    component: resolve => require(['@/views/Behavior/clerkcamera'], resolve),
                                }, {
                                    path: 'clerkcamera2',
                                    name: 'clerkcamera2',
                                    component: resolve => require(['@/views/Behavior/clerkcamera2'], resolve),
                                }, {
                                    path: 'nocustom',
                                    name: 'nocustom',
                                    component: resolve => require(['@/views/Behavior/nocustom'], resolve),
                                }, {
                                    path: 'mallgroup',
                                    name: 'mallgroup',
                                    component: resolve => require(['@/views/Behavior/mallGroup'], resolve),
                                }, {
                                    path: 'customgroup',
                                    name: 'customgroup',
                                    component: resolve => require(['@/views/Behavior/customgroup'], resolve),
                                }, {
                                    path: 'grouptime',
                                    name: 'grouptime',
                                    component: resolve => require(['@/views/Behavior/groupTime'], resolve),
                                }, {
                                    path: 'areagroup',
                                    name: 'areagroup',
                                    component: resolve => require(['@/views/Behavior/areagroup'], resolve),
                                }, {
                                    path: 'gateflow',
                                    name: 'gateflow',
                                    component: resolve => require(['@/views/Behavior/gateflow'], resolve),
                                }, {
                                    path: 'areaflowtime',
                                    name: 'areaflowtime',
                                    component: resolve => require(['@/views/Behavior/areaFlowTime'], resolve),
                                }, {
                                    path: 'effectiveflow',
                                    name: 'effectiveflow',
                                    component: resolve => require(['@/views/Behavior/effectiveflow'], resolve),
                                }, {
                                    path: 'frequency',
                                    name: 'frequency',
                                    component: resolve => require(['@/views/Behavior/Frequency'], resolve),
                                }, {
                                    path: 'returnshop',
                                    name: 'returnshop',
                                    component: resolve => require(['@/views/Behavior/returnshop'], resolve),
                                }, {
                                    path: 'reidtraffic',
                                    name: 'reidtraffic',
                                    component: resolve => require(['@/views/Behavior/reidtraffic'], resolve),
                                },
                                //原来的顾客行为
                                {
                                    path: '/behavior/happinessindex',
                                    name: 'happinessindex',
                                    component: resolve => require(['@/views/Customer/happinessIndex/happinessIndex'], resolve),
                                },
                                {
                                    path: '/behavior/trafficdirection',
                                    name: 'trafficdirection',
                                    component: resolve => require(['@/views/Customer/ftmovingline/ftMovingLine'], resolve),
                                    children: [{
                                        path: 'ftml',
                                        name: 'trafficdirection',
                                        component: resolve => require(['@/views/Customer/ftmovingline/ftml'], resolve),
                                    }]
                                },
                                {
                                    path: '/behavior/multitrafficdirection',
                                    name: 'multitrafficdirection',
                                    component: resolve => require(['@/views/Customer/multi-floorMoveLine/multiftMovingLine'], resolve),
                                    children: [{
                                        path: 'multiftml',
                                        name: 'multitrafficdirection',
                                        component: resolve => require(['@/views/Customer/multi-floorMoveLine/multiftml'], resolve),
                                    }]
                                },
                                {
                                    path: '/behavior/zonedirection',
                                    name: 'zonedirection',
                                    component: resolve => require(['@/views/Customer/ZoneDirection/zoneDirect'], resolve),
                                    children: [{
                                        path: 'zonegraph',
                                        name: 'zonegraph',
                                        component: resolve => require(['@/views/Customer/ZoneDirection/zoneTraffic'], resolve),
                                    }]
                                },
                                {
                                    path: '/behavior/residencetime',
                                    name: 'residencetime',
                                    component: resolve => require(['@/views/Customer/residenceTime/residencetime'], resolve),
                                    children: [{
                                        path: 'rtasis',
                                        name: 'rtasis',
                                        component: resolve => require(['@/views/Customer/residenceTime/rtasis'], resolve),
                                    }]
                                },
                                {
                                    path: '/behavior/customtrack',
                                    name: 'customtrack',
                                    component: resolve => require(['@/views/Customer/customTrack/customtrack'], resolve),
                                },
                                {
                                    path: '/behavior/storeheat',
                                    name: 'storeheat',
                                    component: resolve => require(['@/views/Customer/AreaHeat/areaheat'], resolve),
                                },
                                {
                                    path: '/behavior/boothheat',
                                    name: 'boothheat',
                                    component: resolve => require(['@/views/Customer/Faceheat/faceheat'], resolve),
                                },
                                {
                                    path: '/behavior/moveline',
                                    name: 'moveline',
                                    component: resolve => require(['@/views/Customer/TraffickTrack/tfTrack'], resolve),
                                    children: [{
                                        path: 'trackline',
                                        name: 'trackline',
                                        component: resolve => require(['@/views/Customer/TraffickTrack/trackLine'], resolve),
                                    }]
                                },
                            ]
                        },
                        {
                            path: '/dataasis',
                            component: resolve => require(['@/views/DataAsis/dataasis'], resolve),
                            children: [{
                                path: '/dataasis/trafficasis',
                                name: 'trafficasis',
                                component: resolve => require(['@/views/DataAsis/trafficAsis/trafficasis'], resolve),
                                children: [{
                                    path: 'monthly',
                                    name: 'ta_monthly',
                                    component: resolve => require(['@/views/DataAsis/trafficAsis/monthly'], resolve),
                                }]
                            }, ]
                        },
                        {
                            path: '/manage',
                            component: resolve => require(['@/views/Management/manage'], resolve),
                            children: [{
                                    path: 'usermanage',
                                    name: 'user_manage',
                                    component: resolve => require(['@/views/Management/UserManage/userManage'], resolve),
                                }, {
                                    path: 'userinfomanage',
                                    name: 'user_info_manage',
                                    component: resolve => require(['@/views/Management/PersonInfo/personalInfo'], resolve),
                                }, {
                                    path: 'blocmanage',
                                    name: 'bloc_manage',
                                    component: resolve => require(['@/views/Management/BlocManage/blocManage'], resolve),
                                }, {
                                    path: 'devicestatus',
                                    name: 'device_status',
                                    component: resolve => require(['@/views/Management/DeviceStatus/deviceStatus'], resolve),
                                },
                                {
                                    path: 'deviceScreenshot',
                                    name: 'device_screenshot',
                                    component: resolve => require(['@/views/Management/DeviceScreenshot/deviceScreenshot'], resolve),
                                },
                                {
                                    path: 'floormanage',
                                    name: 'floor_manage',
                                    component: resolve => require(['@/views/Management/FloorManage/floorManage'], resolve),
                                },
                                {
                                    path: 'gatebind',
                                    name: 'gate_bind',
                                    component: resolve => require(['@/views/Management/GateBind/gateBind'], resolve),
                                }, {
                                    path: 'gatemanage',
                                    name: 'gate_manage',
                                    component: resolve => require(['@/views/Management/GateManage/gateManage'], resolve),
                                }, {
                                    path: 'groupmanage',
                                    name: 'group_manage',
                                    component: resolve => require(['@/views/Management/GroupManage/groupManage'], resolve),
                                }, {
                                    path: 'mallmanage',
                                    name: 'mall_manage',
                                    component: resolve => require(['@/views/Management/MallManage/mallManage'], resolve),
                                },
                                {
                                    path: 'zoneManage',
                                    name: 'zone_manage',
                                    component: resolve => require(['@/views/Management/ZoneManage/zoneManage'], resolve),
                                },
                                {
                                    path: 'clerkmanage',
                                    name: 'clerk_manage',
                                    component: resolve => require(['@/views/Management/ClerkManage/clerkmanage'], resolve),
                                },
                                {
                                    path: 'holidaymanage',
                                    name: 'holiday_manage',
                                    component: resolve => require(['@/views/Management/HolidayManage/holidayManage'], resolve),
                                }, {
                                    path: 'actmanage',
                                    name: 'act_manage',
                                    component: resolve => require(['@/views/Management/ActManage/actManage'], resolve),
                                }, {
                                    path: 'formatmanage',
                                    name: 'format_manage',
                                    component: resolve => require(['@/views/Management/FormatManage/formatManage'], resolve),
                                },
                                {
                                    path: 'imgmanage',
                                    name: 'img_manage',
                                    component: resolve => require(['@/views/Management/imgManage/floorImgManage'], resolve),
                                },
                                {
                                    path: 'rolemanage',
                                    name: 'role_manage',
                                    component: resolve => require(['@/views/Management/RoleManage/roleManage'], resolve),
                                },
                                {
                                    path: 'menumanage',
                                    name: 'menu_manage',
                                    component: resolve => require(['@/views/Management/MenuManage/menuManage'], resolve),
                                }, 
                                {
                                    path: 'systeminfo',
                                    name: 'system_info',
                                },
                                {
                                    path: 'devicesearch',
                                    name: 'device_search',
                                    component: resolve => require(['@/views/Management/DeviceDataSearch/device-data-search'], resolve),
                                },
                                {
                                    path: 'devicestate',
                                    name: 'device_state',
                                    component: resolve => require(['@/views/Management/DeviceState/devicestate'], resolve),
                                },
                                {
                                    path: 'devicedata',
                                    name: 'device_data',
                                    component: resolve => require(['@/views/Management/DeviceData/devicedata'], resolve),
                                },
                                {
                                    path: 'wechat',
                                    name: 'we_chat',
                                    component: resolve => require(['@/views/Management/WeChat/wechat'], resolve),
                                },
                                {
                                    path: 'loginlog',
                                    name: 'login_log',
                                    component: resolve => require(['@/views/Management/LoginLog/loginlog'], resolve),
                                },
                                {
                                    path: 'alarmlog',
                                    name: 'alarm_log',
                                    component: resolve => require(['@/views/Management/AlarmLog/alarmlog'], resolve),
                                },
                                {
                                    path: 'videoplayer',
                                    name: 'video_player',
                                    component: resolve => require(['@/views/Management/VideoPlayer/videoplayer'], resolve),
                                },
                                {
                                    path: 'devicelog',
                                    name: 'devicelog',
                                    component: resolve => require(['@/views/Management/deviceLog/index'], resolve),
                                },
                            ]
                        }
                    ]
                },
                {
                    path: '/asus',
                    name: 'asuslogin',
                    component: resolve => require(['@/views/loginAsus/loginAsus'], resolve),
                    children: []
                },
                {
                    path: '/',
                    name: 'xinchenglogin',
                    component: resolve => require(['@/views/loginXincheng/loginXincheng'], resolve),
                    children: []
                }
            ]
            // , {
            //     path: '/',
            //     name: 'login',
            //     component: Login,
            //     children: []
            // }

    })
    // 全局路由守卫
router.beforeEach((to, from, next) => {
    if (to.path === '/' || to.path === '/asus' || to.path === '/xincheng') {
        if (Cookies.get('atoken')) {
            router.push('/home');
        } else {
            next();
        }
    } else {
        if (Cookies.get('atoken')) {
            next();
        } else {
            router.push('/');
        }
    }
    // console.log('navigation-guards');
    // to: Route: 即将要进入的目标 路由对象
    // from: Route: 当前导航正要离开的路由
    // next: Function: 一定要调用该方法来 resolve 这个钩子。执行效果依赖 next 方法的调用参数。
    // const nextRoute = ['home', 'account', 'analysis', 'behavior', 'manage'];
    // let isLogin = global.isLogin; // 是否登录
    // 未登录状态;当路由到nextRoute指定页时,跳转至login
    // console.log('beforeRoute:', to, to.path, nextRoute.indexOf(to.path), isLogin);
    // if (nextRoute.indexOf(to.path) >= 0) {
    //     if (!isLogin) {
    //         console.log('what fuck');
    //         router.push({ name: 'login' })
    //     }
    // }
    // 已登录状态;当路由到login时,跳转至home 
    // if (to.name === 'login') {
    //     if (isLogin) {
    //         router.push({ name: 'home' });
    //     }
    // }
});

export default router;