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 2.0 kB

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