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/:exhibitionId',
    name: 'displayDetail',
    component: () => import('@/views/display/Detail.vue')
  },
  // 文物展
  {
    path: '/culturalRelic',
    name: 'culturalRelic',
    component: () => import('@/views/culturalRelic')
  },
  // 文物详情页
  {
    path: '/culturalRelic/:crId',
    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')
  },
  // 博物馆
  {
    path: '/museum',
    name: 'museum',
    component: () => import('@/views/museum')
  },
  // 博物馆详情
  {
    path: '/museum/:id',
    name: 'museum',
    component: () => import('@/views/museum/Detail.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
