import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import Login from '../views/login.vue'

const router = createRouter({
	history: createWebHashHistory(import.meta.env.BASE_URL),
	routes: [
		{
			path: '/',
			name: 'App',
			redirect: '/login'
		},
		{
			path: '/login',
			name: 'login',
			component: Login,
		},
		{
			path: '/home',
			name: 'home',
			component: () => import('../views/home.vue'),
			children: [
				// {
				// 	path: '/toDo',
				// 	name: 'toDo',
				// 	component: () => import('../views/workBench/toDo.vue'),
				// }
			]
		},
	],
})
// 前置首位 访问权限控制
router.beforeEach((to) => {
  

})
// 后置守卫
router.afterEach((to) => {
	
})
export default router
