routes.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. export default [
  2. {
  3. path: '/',
  4. component: '../layouts/BlankLayout',
  5. routes: [
  6. {
  7. path: '/user',
  8. component: '../layouts/UserLayout',
  9. routes: [
  10. {
  11. name: 'login',
  12. path: '/user/login',
  13. component: './user/login'
  14. }
  15. ]
  16. },
  17. {
  18. path: '/',
  19. component: '../layouts/SecurityLayout',
  20. routes: [
  21. {
  22. path: '/',
  23. component: '../layouts/BasicLayout',
  24. authority: ['admin', 'client_access'],
  25. routes: [
  26. {
  27. path: '/',
  28. redirect: '/customer/contact'
  29. },
  30. {
  31. path: '/customer',
  32. name: 'customer',
  33. icon: 'icon-address-book-o',
  34. routes: [
  35. {
  36. path: '/customer',
  37. redirect: '/customer/contact',
  38. authority: ['admin', 'client_access']
  39. },
  40. {
  41. path: '/customer/contact',
  42. name: 'contact',
  43. icon: 'icon-address-book',
  44. component: './customer/Contact',
  45. authority: ['admin', 'client_access']
  46. },
  47. {
  48. path: '/customer/company',
  49. name: 'company',
  50. icon: 'icon-building',
  51. component: './customer/Company',
  52. authority: ['admin', 'company_access']
  53. },
  54. {
  55. path: '/customer/business',
  56. name: 'business',
  57. icon: 'icon-usd-circle',
  58. component: './customer/Business'
  59. }
  60. ]
  61. },
  62. {
  63. path: '/product',
  64. name: 'product',
  65. icon: 'icon-box',
  66. routes: [
  67. {
  68. path: '/product',
  69. redirect: '/product/lock'
  70. },
  71. {
  72. path: '/product/lock',
  73. name: 'lock',
  74. icon: 'icon-magic',
  75. routes: [
  76. {
  77. path: '/product/lock',
  78. redirect: '/product/lock/lockstore'
  79. },
  80. {
  81. path: '/product/lock/lockstore',
  82. name: 'lockstore',
  83. component: './product/lock/Lockstore'
  84. },
  85. {
  86. path: '/product/lock/lockcount',
  87. name: 'lockcount',
  88. component: './product/lock/Lockcount'
  89. }
  90. ]
  91. },
  92. {
  93. path: '/product/cloud',
  94. name: 'cloud',
  95. icon: 'icon-cloud',
  96. routes: [
  97. {
  98. path: '/product/cloud',
  99. redirect: '/product/cloud/building'
  100. },
  101. {
  102. path: '/product/cloud/building',
  103. name: 'build',
  104. component: './product/cloud/Building'
  105. },
  106. {
  107. path: '/product/cloud/curing',
  108. name: 'curing',
  109. component: './product/cloud/Curing'
  110. }
  111. ]
  112. }
  113. ]
  114. },
  115. {
  116. path: '/staff',
  117. name: 'staff',
  118. icon: 'icon-users',
  119. routes: [
  120. {
  121. path: '/staff',
  122. redirect: '/staff/employee'
  123. },
  124. {
  125. path: '/staff/employee',
  126. name: 'employee',
  127. icon: 'icon-users',
  128. component: './staff/Employee'
  129. }
  130. ]
  131. }
  132. ]
  133. }
  134. ]
  135. }
  136. ]
  137. },
  138. {
  139. component: './404'
  140. }
  141. ]