importVuefrom'vue'importVueRouterfrom'vue-router'Vue.use(VueRouter)//解决跳转到当前路径由的时候,控制平台报错//constoriginalPush=VueRouter.prototype.push//VueRouter.prototype.push=functionpush(location){//returnoriginalPush.call(this,location).catch(err=>err)//}constroutes=[{path:'/',name:'index',组件:()=>import('./../views/home/index')},{路径:'/movie',名称:'/movie',组件:()=>import('./../views/movie/index')},{path:'/birth',name:'/birth',组件:()=>import('./../views/birth/index')},{path:'/Lifemeeting',name:'/Lifemeeting',component:()=>import('./../views/Lifemeeting/Lifemeeting')},{path:'/Sign',name:'/Sign',组件:()=>import('./../views/UserInformation/Sign.vue')},]constrouter=newVueRouter({mode:'history',base:process.env.BASE_URL,routes})////router.beforeEach((from,to,next)=>{//console.log('from',from)//console.log('to',to)//next()//})导出默认路由器
