import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';
import homepageL  from '@/views/homepageL.vue'
import loginPage from '@/views/login/loginPage.vue'
import KanBan from '@/views/KanBan.vue';

Vue.use(VueRouter);

const routes = [
  // {
  //   path: '/login',
  //   name:'login',
  //   component: () => import('@/views/login/index.vue'),
  //   meta: {
  //     title: '登录',
  //     keepAlive: false
  //   }
  // },
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/homepageL', // 默认跳转到首页
    children: [
      {
        path: 'homepageL',
        name: 'homepageL',
        component: homepageL,
      }
    ],
  },
  {
    path:'/login',
    name:'login',
    component:loginPage,
		meta: {
      title: '登录',
      keepAlive: false
    }
  },
  {
    path:'/KanBan',
    name:'KanBan',
    component:KanBan
  },
  {
    path: '/wxTest',
    name: 'wxTest',
    component: () => import('@/views/login/wxTest.vue'), // 补充组件路径
  }
];

const router = new VueRouter({
  routes,
});

export default router;
