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

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    meta: { title: '活动' },
    component: () => import(/* webpackChunkName: "index" */ '../views/index.vue')
  },
  {
    path: '/tool',
    name: 'tool',
    meta: { title: '工具' },
    component: () => import(/* webpackChunkName: "tool" */ '../views/tool.vue')
  },
  {
    path: '/mine',
    name: 'mine',
    meta: { title: '个人中心' },
    component: () => import(/* webpackChunkName: "mine" */ '../views/mine.vue')
  },
  {
    path: '/activityDetail/:id',
    name: 'activityDetail',
    meta: { title: '活动详情' },
    component: () => import(/* webpackChunkName: "activity" */ '../views/activityDetail.vue')
  },
  {
    path: '/applyInfo/:id',
    name: 'applyInfo',
    meta: { title: '报名信息' },
    component: () => import(/* webpackChunkName: "mine" */ '../views/applyInfo.vue')
  },
  {
    path: '/activityHistory',
    name: 'activityHistory',
    meta: { title: '活动记录' },
    component: () => import(/* webpackChunkName: "mine" */ '../views/activityHistory.vue')
  },
  {
    path: '/posterHistory',
    name: 'posterHistory',
    meta: { title: '海报记录' },
    component: () => import(/* webpackChunkName: "mine" */ '../views/posterHistory.vue')
  },
  {
    path: '/equipment',
    name: 'equipment',
    meta: { title: '设备管理' },
    component: () => import(/* webpackChunkName: "mine" */ '../views/equipment.vue')
  },
]

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

export default router
