|
- import Vue from 'vue'
- import Router from 'vue-router'
- import DataAnalysis from '../components/DataAnalysis.vue'
- import ProAnalysis from '../components/ProAnalysis.vue'
- import ProTrend from '../components/ProTrend.vue'
- import UserTrend from '../components/UserTrend.vue'
- import UserAnalysis from '../components/UserAnalysis.vue'
- import BrainAnalysis from '../components/BrainAnalysis.vue'
- import Overview from '../components/Overview.vue'
-
- const originalPush = Router.prototype.push
-
- Router.prototype.push = function push(location) {
- return originalPush.call(this, location).catch(err => err)
- }
- Vue.use(Router)
-
- export default new Router({
- mode: 'history',
- base: '/explore/data_analysis/', //添加根目录
- scrollBehavior: () => ({ y: 0 }),
- routes:[
- {
- path:'/',redirect:'/ProAnalysis',
- name:'ProAnalysis',
- component:ProAnalysis,
- },
-
- {
- path:'/Overview',
- name:'Overview',
- component:Overview,
- },
- {
- path:'/ProTrend',
- name:'ProTrend',
- component:ProTrend,
- },
- {
- path:'/ProAnalysis',
- name:'ProAnalysis',
- component:ProAnalysis,
- },
- {
- path:'/UserAnalysis',
- name:'UserAnalysis',
- component:UserAnalysis,
- },
- {
- path:'/UserTrend',
- name:'UserTrend',
- component:UserTrend,
- },
-
- {
- path:'/BrainAnalysis',
- name:'BrainAnalysis',
- component:BrainAnalysis,
- },
-
- ],
-
-
- })
|