import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home'

Vue.use(VueRouter)

const routes = [
  // 首页
  {
    path: '/',
    name: 'home',
    component: Home
  },
  // 精品展
  {
    path: '/boutique',
    name: 'about',
    component: () => import('@/views/boutique')
  },
  // 虚拟展厅
  {
    path: '/virtual',
    name: 'virtual',
    component: () => import('@/views/virtual')
  },
  // 布展
  {
    path: '/display',
    name: 'display',
    component: () => import('@/views/display')
  },
  // 布展详情页
  {
    path: '/display/:id',
    name: 'displayDetail',
    component: () => import('@/views/display/Detail.vue')
  },
  // 文物展
  {
    path: '/culturalRelic',
    name: 'culturalRelic',
    component: () => import('@/views/culturalRelic')
  },
  // 文物详情页
  {
    path: '/culturalRelic/:id',
    name: 'culturalRelicDetail',
    component: () => import('@/views/culturalRelic/Detail.vue')
  },
  // 个人中心
  {
    path: '/personal',
    name: 'personal',
    component: () => import('@/views/personal')
  },
  // 登录
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login')
  },

  // 注册页
  {
    path: '/register',
    name: 'register',
    component: () => import('@/views/register')
  },
]

const router = new VueRouter({
  routes
})

export default router
