index.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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'
  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. Vue.use(Router)
  21. export default new Router({
  22. routes: [
  23. {
  24. path: '/',
  25. name: 'Index',
  26. component: Index
  27. },
  28. {
  29. path: '/user/login',
  30. name: 'UserLogin',
  31. component: UserLogin
  32. },
  33. {
  34. path: '/user/setting',
  35. name: 'UserSetting',
  36. component: UserSetting
  37. },
  38. {
  39. path: '/user/register',
  40. name: 'UserRegister',
  41. component: UserRegister
  42. },
  43. {
  44. path: '/user/resetPassword',
  45. name: 'UserResetPassword',
  46. component: UserResetPassword
  47. },
  48. {
  49. path: '/user/ResetPasswordByUrl',
  50. name: 'ResetPasswordByUrl',
  51. component: ResetPasswordByUrl
  52. },
  53. {
  54. path: '/item/index',
  55. name: 'ItemIndex',
  56. component: ItemIndex
  57. },
  58. {
  59. path: '/item/add',
  60. name: 'ItemAdd',
  61. component: ItemAdd
  62. },
  63. {
  64. path: '/item/password/:item_id',
  65. name: 'ItemPassword',
  66. component: ItemPassword
  67. },
  68. {
  69. path: '/:item_id',
  70. name: 'ItemShow',
  71. component: ItemShow
  72. },
  73. {
  74. path: '/item/export/:item_id',
  75. name: 'ItemExport',
  76. component: ItemExport
  77. },
  78. {
  79. path: '/item/setting/:item_id',
  80. name: 'ItemSetting',
  81. component: ItemSetting
  82. },
  83. {
  84. path: '/page/:page_id',
  85. name: 'PageIndex',
  86. component: PageIndex
  87. },
  88. {
  89. path: '/page/edit/:item_id/:page_id',
  90. name: 'PageEdit',
  91. component: PageEdit
  92. },
  93. {
  94. path: '/page/diff/:page_id/:page_history_id',
  95. name: 'PageDiff',
  96. component: PageDiff
  97. },
  98. {
  99. path: '/catalog/:item_id',
  100. name: 'Catalog',
  101. component: Catalog
  102. },
  103. {
  104. path: '/notice/index',
  105. name: 'Notice',
  106. component: Notice
  107. },
  108. ]
  109. })