text: import Vue from 'vue'
  import VueRouter from 'vue-router'
  
  // 引入组件 路由懒加载
  const Home = () => import('../views/home/home')
  const Category = () => import('../views/category/category')
  const Cart = () => import('../views/cart/cart')
  const Profile = () => import('../views/profile/profile')
  
  // 1.安装插件
  Vue.use(VueRouter)
  
  // 2.创建插件
  const routes = [
    {
      path: '',
      redirect: '/home'
    },
    {
      path: '/home',
      component: Home
    },
    {
      path: '/category',
      component: Category
    },
    {
      path: '/cart',
      component: Category
    },
    {
      path: '/profile',
      component: Profile
    }
  ]
  const router = new VueRouter({
    routes,
    mode: 'history'
  })
  
  // 3.导出
  export default router
  
  