import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
    },
    {
      path: '/page',
      name: 'page',
      component: () => import(/* webpackChunkName: "login" */ '../views/page.vue')
    },
    {
      path: '/level',
      name: 'level',
      component: () => import(/* webpackChunkName: "level" */ '../views/Level.vue')
    },
    {
      path: '/link',
      name: 'link',
      component: () => import(/* webpackChunkName: "link" */ '../views/Link.vue')
    },
    {
      path: '/weather',
      name: 'weather',
      component: () => import(/* webpackChunkName: "link" */ '../views/Weather.vue')
    },
    {
      path: '/green',
      name: 'green',
      component: () => import(/* webpackChunkName: "link" */ '../views/Green.vue')
    },
    {
      path: '/biology',
      name: 'biology',
      component: () => import(/* webpackChunkName: "link" */ '../views/Biology.vue')
    },
    {
      path: '/shentou',
      name: 'shentou',
      component: () => import(/* webpackChunkName: "link" */ '../views/Shentou.vue')
    },
    {
      path: '/chuxu',
      name: 'chuxu',
      component: () => import(/* webpackChunkName: "link" */ '../views/Chuxu.vue')
    },
    {
      path: '/config',
      name: 'config',
      component: () => import(/* webpackChunkName: "link" */ '../views/Config.vue')
    }
  ]
})

export default router