import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = Router.prototype.push
 
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

export default new Router({
    mode: 'history',
    routes:[
      {
        path: "/",
        name: "login",
        component: () => import(/* webpackChunkName: "book" */ "@/view/login.vue")
      },
      {
        path: "/home",
        name: "home",
        component: () => import(/* webpackChunkName: "book" */ "@/view/home.vue")
      },
      {
        path: "/giftBox",
        name: "giftBox",
        component: () => import(/* webpackChunkName: "book" */ "@/view/giftBox.vue")
      },
      {
        path: "/share",
        name: "share",
        component: () => import(/* webpackChunkName: "book" */ "@/view/share.vue")
      },
      // {
      //   path: "/giftBoxOne",
      //   name: "giftBoxOne",
      //   component: () => import(/* webpackChunkName: "book" */ "@/view/giftBoxOne.vue")
      // },
      {
        path: "/giftBoxFive",
        name: "giftBoxFive",
        component: () => import(/* webpackChunkName: "book" */ "@/view/giftBoxFive.vue")
      },
      {
        path: "/fittingRoom",
        name: "fittingRoom",
        component: () => import(/* webpackChunkName: "book" */ "@/view/fittingRoom.vue")
      },
      {
        path: "/save",
        name: "save",
        component: () => import(/* webpackChunkName: "book" */ "@/view/save.vue")
      },
      {
        path: "/more",
        name: "more",
        component: () => import(/* webpackChunkName: "book" */ "@/view/more.vue")
      },
      {
        path: "/pasterStore",
        name: "pasterStore",
        component: () => import(/* webpackChunkName: "book" */ "@/view/pasterStore.vue")
      },
      {
        path: "/moreGift",
        name: "moreGift",
        component: () => import(/* webpackChunkName: "book" */ "@/view/moreGift.vue")
      },
      {
        path: "/verification",
        name: "verification",
        component: () => import(/* webpackChunkName: "book" */ "@/view/verification.vue")
      },
    ]
})