“dzb”
2022-09-21 091618590e16bc7e3f989944494b49ab6e98b626
src/router/index.js
@@ -1,23 +1,107 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
    path:"/",
    name:'index',
    redirect:'/home'
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
    path: '/home',
    name: 'home',
    component: () => import('@/views/layout'),
    children: [
      {
        path: 'system',
        name: 'system',
        component: () => import('@/views/systemSetting'),
        children: [
          {
            path: "user",
            name: "user",
            component: () => import('@/views/systemSetting/baseSetting/user')
          },
          {
            path:'role',
            name:'role',
            component: () => import('@/views/systemSetting/baseSetting/role')
          },
          {
            path:'authority',
            name:'authority',
            component: () => import('@/views/systemSetting/baseSetting/authority')
          },
          {
            path:'department',
            name:'department',
            component: () => import('@/views/systemSetting/baseSetting/department')
          },
          {
            path:'portalSetting',
            name:'portalSetting',
            component: () => import('@/views/systemSetting/platform/portalSetting')
          },
          {
            path:'otherInterface',
            name:'otherInterface',
            component: () => import('@/views/systemSetting/platform/otherInterface')
          },
          {
            path:'mySetting',
            name:'mySetting',
            component: () => import('@/views/systemSetting/platform/mySetting')
          }
        ]
      },
      {
        path: "operate",
        name: 'operate',
        component: () => import('@/views/operate/index.vue')
      },
      {
        path: "video",
        name: 'video',
        component: () => import('@/views/video')
      },
      {
        path: "lampblack",
        name: 'lampblack',
        component: () => import('@/views/lampblack')
      },
      {
        path: "law",
        name: 'law',
        component: () => import('@/views/law')
      },
      {
        path: "intellect",
        name: 'intellect',
        component: () => import('@/views/intellect')
      },
      {
        path: "info",
        name: 'info',
        component: () => import('@/views/info')
      },
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login')
  },
  {
    path: '/screen',
    name: 'screen',
    component: () => import('@/views/screen')
  },
  {
    path: '/404',
    name: "404",
    component: () => import('@/views/NotFound'),
  },
  // { path: '*', redirect: '/404' }
]
const router = new VueRouter({
@@ -25,5 +109,8 @@
  base: process.env.BASE_URL,
  routes
})
const originalPush = router.push
router.push = function push(location) {
   return originalPush.call(this, location).catch(err => err);
}
export default router