index.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. Vue.use(VueRouter)
  4. const originalPush = VueRouter.prototype.push
  5. VueRouter.prototype.push = function push (location) {
  6. return originalPush.call(this, location).catch(err => err)
  7. }
  8. const routes = [
  9. {
  10. path: '/',
  11. redirect: '/index'
  12. },
  13. {
  14. path: '/index',
  15. name: 'Main',
  16. component: () => import('../pages/Main/index.vue')
  17. },
  18. {
  19. path: '/ruins',
  20. name: 'Ruins',
  21. component: () => import('../pages/ruins/index.vue')
  22. },
  23. {
  24. path: '/ruins-detail',
  25. name: 'Ruins-Detail',
  26. component: () => import('../pages/ruins-detail/index.vue')
  27. },
  28. {
  29. path: '/travel-around',
  30. name: 'Travel-Around',
  31. component: () => import('../pages/travel-around/index.vue')
  32. },
  33. {
  34. path: '/over-look',
  35. name: 'Over-Look',
  36. component: () => import('../pages/over-look/index.vue')
  37. },
  38. // {
  39. // path: '/search',
  40. // name: 'Search',
  41. // component: () => import('../pages/search/index.vue'),
  42. // meta: {id: ''}
  43. // },
  44. // {
  45. // path: '/scenes',
  46. // name: 'Scenes',
  47. // component: () => import('../pages/scenes/index.vue'),
  48. // meta: {id: '5'}
  49. // },
  50. // {
  51. // path: '/sceneiframe',
  52. // name: 'Scene',
  53. // component: () => import('../pages/sceneiframe/index.vue'),
  54. // meta: {id: '12'}
  55. // },
  56. // {
  57. // path: '/antiques',
  58. // name: 'Antiques',
  59. // component: () => import('../pages/antiques/index.vue'),
  60. // meta: {id: 10}
  61. // },
  62. // {
  63. // path: '/detail',
  64. // name: 'Detail',
  65. // component: () => import('../pages/detail/index.vue'),
  66. // meta: {id: 15}
  67. // },
  68. // {
  69. // path: '/panorama',
  70. // name: 'Panorama',
  71. // component: () => import('../pages/panorama/index.vue'),
  72. // meta: {id: 11}
  73. // },
  74. // {
  75. // path: '/map',
  76. // name: 'Map',
  77. // component: () => import('../pages/map/index.vue'),
  78. // meta: {id: 16}
  79. // },
  80. // {
  81. // path: '/all',
  82. // name: 'All',
  83. // component: () => import('../pages/All/index.vue'),
  84. // meta: {id: 17}
  85. // }
  86. ]
  87. const router = new VueRouter({
  88. routes
  89. })
  90. export default router