import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import Login from '@/views/Login.vue'
import UserInfo from '@/views/systemview/UserInfo.vue'
import TestReport from '@/views/tool/TestReport';




const routes = [
  { path: '/', redirect: '/home' },
  {
    path: '/:pathMatch(.*)*',
    component: () => import('@/views/error/index.vue'),
    hidden: true
  },
  {
    name: 'home',
    path: '/home',
    component: HomeView,
    children: [{
      path: 'userinfo',
      name: 'userinfo',
      component: UserInfo,
    },
    {
      path: 'report',
      name: 'report',
      component: TestReport
    }
  ]
  }, {
    name: 'login',
    path: '/login',
    component: Login,
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})


export default router
