portal.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. const portal = [
  2. // {
  3. // name: 'portal',
  4. // path: '/portal',
  5. // components: () => import('@/portal/index.vue'),
  6. // children: [
  7. // {
  8. // name: 'resourceCenter',
  9. // path: '/portal/resourceCenter',
  10. // component: () => import('@/resourceCenter/index.vue')
  11. // },
  12. // {
  13. // name: 'resourceDetails',
  14. // path: '/portal/resourceDetails',
  15. // component: () => import('@/resourceDetails/index.vue')
  16. // }
  17. // ]
  18. // }
  19. {
  20. name: 'portal',
  21. path: '/portal',
  22. component: () => import('@/views/portal/index.vue'),
  23. children: [
  24. {
  25. name: 'portal.resourceCenter',
  26. path: '/portal/resourceCenter',
  27. hide: true,
  28. component: () => import('@/views/resourceCenter/index.vue')
  29. },
  30. {
  31. name: 'portal.resourceDetails',
  32. path: '/portal/resourceDetails',
  33. hide: true,
  34. component: () => import('@/views/resourceDetails/index.vue')
  35. },
  36. {
  37. name: 'portal.personalResources',
  38. path: '/portal/personalResources',
  39. component: () => import('@/views/myResources/personalResources/index.vue')
  40. },
  41. {
  42. name: 'portal.resourceManagement',
  43. path: '/portal/resourceManagement',
  44. component: () => import('@/views/myResources/resourceManagement/index.vue')
  45. },
  46. {
  47. name: 'portal.courseCenter',
  48. path: '/portal/courseCenter',
  49. component: () => import('@/views/courseCenter/index.vue')
  50. },
  51. {
  52. name: 'portal.courseDetails',
  53. path: '/portal/courseDetails',
  54. component: () => import('@/views/courseDetails/index.vue')
  55. },
  56. {
  57. name: 'portal.courseAdd',
  58. path: '/portal/courseAdd',
  59. component: () => import('@/views/courseAdd/index.vue')
  60. },
  61. {
  62. name: 'portal.courseManagement',
  63. path: '/portal/courseManagement',
  64. component: () => import('@/views/courseManagement/index.vue')
  65. }
  66. ]
  67. },
  68. {
  69. path: '/notLook',
  70. name: 'notLook',
  71. component: () => import('@/views/notLook/index.vue'),
  72. children: []
  73. },
  74. {
  75. name: 'slogin',
  76. path: '/slogin',
  77. component: () => import('@/views/slogin/login.vue'),
  78. },
  79. {
  80. name: 'tlogin',
  81. path: '/tlogin',
  82. component: () => import('@/views/tlogin/login.vue'),
  83. }
  84. ]
  85. /**
  86. * 路由白名单(数组形式)
  87. *
  88. * 如果组件像登录一样,那就简单的写一个path,即可实现放开,
  89. * 如果组件不在这边的,需要手动添加组件,就像other一样,
  90. * 因为没登陆你没法拿到后端给你返回的那一坨,当然就找不到component
  91. *
  92. * @author yubaoshan
  93. */
  94. export default portal