You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 1.6 kB

3 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import DataAnalysis from '../components/DataAnalysis.vue'
  4. import ProAnalysis from '../components/ProAnalysis.vue'
  5. import ProTrend from '../components/ProTrend.vue'
  6. import UserTrend from '../components/UserTrend.vue'
  7. import UserAnalysis from '../components/UserAnalysis.vue'
  8. import BrainAnalysis from '../components/BrainAnalysis.vue'
  9. import Overview from '../components/Overview.vue'
  10. const originalPush = Router.prototype.push
  11. Router.prototype.push = function push(location) {
  12. return originalPush.call(this, location).catch(err => err)
  13. }
  14. Vue.use(Router)
  15. export default new Router({
  16. mode: 'history',
  17. base: '/explore/data_analysis/', //添加根目录
  18. scrollBehavior: () => ({ y: 0 }),
  19. routes:[
  20. {
  21. path:'/',redirect:'/ProAnalysis',
  22. name:'ProAnalysis',
  23. component:ProAnalysis,
  24. },
  25. {
  26. path:'/Overview',
  27. name:'Overview',
  28. component:Overview,
  29. },
  30. {
  31. path:'/ProTrend',
  32. name:'ProTrend',
  33. component:ProTrend,
  34. },
  35. {
  36. path:'/ProAnalysis',
  37. name:'ProAnalysis',
  38. component:ProAnalysis,
  39. },
  40. {
  41. path:'/UserAnalysis',
  42. name:'UserAnalysis',
  43. component:UserAnalysis,
  44. },
  45. {
  46. path:'/UserTrend',
  47. name:'UserTrend',
  48. component:UserTrend,
  49. },
  50. {
  51. path:'/BrainAnalysis',
  52. name:'BrainAnalysis',
  53. component:BrainAnalysis,
  54. },
  55. ],
  56. })