import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import(/* webpackChunkName: "home" */ '../views/Home/Home.vue')
  },
  {
    path: '/add',
    name: 'Add',
    component: () => import(/* webpackChunkName: "add" */ '../views/Add/Add.vue')
  },
  {
    path: '/account',
    name: 'Account',
    component: () => import(/* webpackChunkName: "account" */ '../views/Account/Account.vue')
  },
  {
    path: '/updatelog',
    name: 'UpdateLog',
    component: () => import(/* webpackChunkName: "updatelog" */ '../views/UpdateLog/UpdateLog.vue')
  },
  // {
  //   path: '/feedback',
  //   name: 'Feedback',
  //   component: () => import(/* webpackChunkName: "feedback" */ '../views/Feedback/Feedback.vue')
  // },
  {
    path: '/settings',
    name: 'Settings',
    component: () => import(/* webpackChunkName: "settings" */ '../views/Settings/Settings.vue')
  },
  {
    path: '/unlock',
    name: 'Unlock',
    component: () => import(/* webpackChunkName: "unlock" */ '../views/Unlock/Unlock.vue')
  },
	{
	  path: '/detail',
	  name: 'Detail',
	  component: () => import(/* webpackChunkName: "detail" */ '../views/Detail/Detail.vue')
	},
	{
	  path: '/generator',
	  name: 'Generator',
	  component: () => import(/* webpackChunkName: "generator" */ '../views/Generator/Generator.vue')
	},
	{
		path: '*', // 页面不存在的情况下会跳到home
		redirect: '/',
		name: 'notFound',
		hidden: true
	}
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
