import Vue from 'vue' import VueRouter from 'vue-router' import HomeView from '../views/HomeView.vue' Vue.use(VueRouter) const routes = [ { path:'/', redirect:'/home', }, { path: '/home', component: HomeView, redirect:'home/employeeDynamics', children: [ { path: '/home/employeeDynamics', component: () => import('@/views/HomeView/EmployeeDynamics.vue') }, { path: '/home/pointsMall', component: () => import('@/views/HomeView/PointsMall.vue') }, { path: '/home/pointsMall/redeem', component: () => import('@/views/HomeView/RedeemView.vue') }, { path: '/home/welfareList', component: () => import('@/views/HomeView/WelfareList.vue') }, { path: '/home/festiveEvents', component: () => import('@/views/HomeView/FestiveEvents.vue') } ] }, { path: '/noticeCenter', component: () => import('../views/NoticeCenter.vue') }, { path: '/pointsRank', component: () => import('../views/PointsRank.vue') } ] const router = new VueRouter({ mode: 'history', linkActiveClass:'route-active', routes, }) export default router