import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'login',
      component: resolve => require(['@/components/Login'], resolve),
    },
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['@/components/Login'], resolve),
    },
    {
      path: '/Forgetpassword',
      name: 'Forgetpassword',
      component: resolve => require(['@/components/Forgetpassword'], resolve),
    },
    {
      path: '/Register',
      name: 'Register',
      component: resolve => require(['@/components/Register'], resolve),
    },
    {
      path: '/index',
      name: 'index',
      component: resolve => require(['@/components/index'], resolve),
    },
    {
      path: '/menu',
      name: 'menu',
      component: resolve => require(['@/components/system/menu'], resolve),
    },
    {
      path: '/minimenu', //小程序菜单管理
      name: 'minimenu',
      component: resolve => require(['@/components/system/minimenu'], resolve),
    },
    {
      path: '/setminipage', //设置小程序菜单
      name: 'setminipage',
      component: resolve => require(['@/components/system/setminipage'], resolve),
    },
    {
      path: '/mall',
      name: 'mall',
      component: resolve => require(['@/components/mall'], resolve),
      children: [{
          path: '/zanIndex',
          name: 'zanIndex',
          component: resolve => require(['@/components/zanIndex'], resolve),
        },
        // 用户管理 用户列表
        {
          path: '/usersList',
          name: 'usersList',
          component: resolve => require(['@/components/UserMan/usersList'], resolve),
        },
        // 用户管理 用户列表编辑
        {
          path: '/usersListEdit',
          name: 'usersListEdit',
          component: resolve => require(['@/components/UserMan/usersListEdit'], resolve),
        },

        // 用户管理 核销员
        {
          path: '/verificationMember',
          name: 'verificationMember',
          component: resolve => require(['@/components/UserMan/verificationMember'], resolve),
        },
        // 用户管理 会员等级
        {
          path: '/MembershipGrade',
          name: 'MembershipGrade',
          component: resolve => require(['@/components/UserMan/MembershipGrade'], resolve),
        },
        // 用户管理 会员等级/会员设置
        {
          path: '/setMember',
          name: 'setMember',
          component: resolve => require(['@/components/UserMan/setMember'], resolve),
        },
        // 用户管理 会员等级/会员购买
        {
          path: '/MembersBuy',
          name: 'MembersBuy',
          component: resolve => require(['@/components/UserMan/MembersBuy'], resolve),
        },
        // 用户管理 分销商管理 基础设置
        {
          path: '/baseSet',
          name: 'baseSet',
          component: resolve => require(['@/components/UserMan/baseSet'], resolve),
        },
        // 商品管理 素材管理
        {
          path: '/materialMan',
          name: 'materialMan',
          component: resolve => require(['@/components/CommodityMan/materialMan'], resolve),
        },
        //设置 基础设置
        {
          path: '/basicSetUp',
          name: 'basicSetUp',
          component: resolve => require(['@/components/setup/basicSetUp'], resolve),
        },
        //店铺管理 导航图标
        {
          path: '/navigationIcon',
          name: 'navigationIcon',
          component: resolve => require(['@/components/StoreDesign/navigationIcon'], resolve),
        },
        // 物流设置 新增运费规则
        {
          path: '/addFreightRule',
          name: 'addFreightRule',
          component: resolve => require(['@/components/setup/addFreightRule'], resolve),
        },
        //店铺管理 导航图标
        {
          path: '/navigationIcon',
          name: 'navigationIcon',
          component: resolve => require(['@/components/StoreDesign/navigationIcon'], resolve),
        },
        //店铺管理 商城风格
        {
          path: '/storeStyle',
          name: 'storeStyle',
          component: resolve => require(['@/components/StoreDesign/storeStyle'], resolve),
        },
        //店铺管理 小程序页面
        {
          path: '/mimipage',
          name: 'mimipage',
          component: resolve => require(['@/components/StoreDesign/mimipage'], resolve),
        },
        //店铺管理 标签栏
        {
          path: '/labelBar',
          name: 'labelBar',
          component: resolve => require(['@/components/StoreDesign/labelBar'], resolve),
        }
      ]
    },

  ]
})
