index.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import Index from '@/components/Index'
  4. import UserLogin from '@/components/user/Login'
  5. import UserSetting from '@/components/user/Setting'
  6. import UserRegister from '@/components/user/Register'
  7. import UserResetPassword from '@/components/user/ResetPassword'
  8. import ResetPasswordByUrl from '@/components/user/ResetPasswordByUrl'
  9. import ItemIndex from '@/components/item/Index'
  10. import ItemAdd from '@/components/item/add/Index'
  11. import ItemPassword from '@/components/item/Password'
  12. import ItemShow from '@/components/item/show/Index'
  13. import ItemExport from '@/components/item/export/Index'
  14. import ItemSetting from '@/components/item/setting/Index'
  15. import PageIndex from '@/components/page/Index'
  16. import PageEdit from '@/components/page/edit/Index'
  17. import PageDiff from '@/components/page/Diff'
  18. import Catalog from '@/components/catalog/Index'
  19. import Notice from '@/components/notice/Index'
  20. import Admin from '@/components/admin/Index'
  21. import Team from '@/components/team/Index'
  22. import TeamMember from '@/components/team/Member'
  23. import TeamItem from '@/components/team/Item'
  24. import Attachment from '@/components/attachment/Index'
  25. import ItemGroup from '@/components/item/group/Index'
  26. Vue.use(Router)
  27. export default new Router({
  28. routes: [
  29. {
  30. path: '/',
  31. name: 'Index',
  32. component: Index
  33. },
  34. {
  35. path: '/user/login',
  36. name: 'UserLogin',
  37. component: UserLogin
  38. },
  39. {
  40. path: '/user/setting',
  41. name: 'UserSetting',
  42. component: UserSetting
  43. },
  44. {
  45. path: '/user/register',
  46. name: 'UserRegister',
  47. component: UserRegister
  48. },
  49. {
  50. path: '/user/resetPassword',
  51. name: 'UserResetPassword',
  52. component: UserResetPassword
  53. },
  54. {
  55. path: '/user/ResetPasswordByUrl',
  56. name: 'ResetPasswordByUrl',
  57. component: ResetPasswordByUrl
  58. },
  59. {
  60. path: '/item/index',
  61. name: 'ItemIndex',
  62. component: ItemIndex
  63. },
  64. {
  65. path: '/item/add',
  66. name: 'ItemAdd',
  67. component: ItemAdd
  68. },
  69. {
  70. path: '/item/password/:item_id',
  71. name: 'ItemPassword',
  72. component: ItemPassword
  73. },
  74. {
  75. path: '/:item_id',
  76. name: 'ItemShow',
  77. component: ItemShow
  78. },
  79. {
  80. path: '/item/export/:item_id',
  81. name: 'ItemExport',
  82. component: ItemExport
  83. },
  84. {
  85. path: '/item/setting/:item_id',
  86. name: 'ItemSetting',
  87. component: ItemSetting
  88. },
  89. {
  90. path: '/page/:page_id',
  91. name: 'PageIndex',
  92. component: PageIndex
  93. },
  94. {
  95. path: '/p/:unique_key',
  96. name: 'PageIndex',
  97. component: PageIndex
  98. },
  99. {
  100. path: '/page/edit/:item_id/:page_id',
  101. name: 'PageEdit',
  102. component: PageEdit
  103. },
  104. {
  105. path: '/page/diff/:page_id/:page_history_id',
  106. name: 'PageDiff',
  107. component: PageDiff
  108. },
  109. {
  110. path: '/catalog/:item_id',
  111. name: 'Catalog',
  112. component: Catalog
  113. },
  114. {
  115. path: '/notice/index',
  116. name: 'Notice',
  117. component: Notice
  118. },
  119. {
  120. path: '/admin/index',
  121. name: 'Admin',
  122. component: Admin
  123. },
  124. {
  125. path: '/team/index',
  126. name: 'Team',
  127. component: Team
  128. },
  129. {
  130. path: '/team/member/:team_id',
  131. name: 'TeamMember',
  132. component: TeamMember
  133. },
  134. {
  135. path: '/team/item/:team_id',
  136. name: 'TeamItem',
  137. component: TeamItem
  138. },
  139. {
  140. path: '/attachment/index',
  141. name: 'Attachment',
  142. component: Attachment
  143. },
  144. {
  145. path: '/item/group/index',
  146. name: 'ItemGroup',
  147. component: ItemGroup
  148. }
  149. ]
  150. })