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: '/Fsetting', //微信小程序设置
      name: 'Fsetting',
      component: resolve => require(['@/components/Fsetting'], resolve),
      children: [
         //店铺管理 微信基础设置
        {
          path: '/wexinappconfig',
          name: 'wexinappconfig',
          component: resolve => require(['@/components/StoreDesign/wexinappconfig'], resolve),
        }, //店铺管理 微信基础设置
        {
          path: '/wexinappmsg',
          name: 'wexinappmsg',
          component: resolve => require(['@/components/StoreDesign/wexinappmsg'], 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: '/customSet',
          name: 'customSet',
          component: resolve => require(['@/components/UserMan/customSet'], resolve),
        },
        // 用户管理 分销商管理 分销商等级
        {
          path: '/distributorLevel',
          name: 'distributorLevel',
          component: resolve => require(['@/components/UserMan/distributorLevel'], resolve),
        },
        // 用户管理 分销商管理 新增或编辑分销商等级
        {
          path: '/setDistributorLevel',
          name: 'setDistributorLevel',
          component: resolve => require(['@/components/UserMan/setDistributorLevel'], resolve),
        },
        // 用户管理 分销商管理 分销商
        {
          path: '/distributors',
          name: 'distributors',
          component: resolve => require(['@/components/UserMan/distributors'], resolve),
        },

        // 商品管理 素材管理
        {
          path: '/materialMan',
          name: 'materialMan',
          component: resolve => require(['@/components/CommodityMan/materialMan'], resolve),
        },
        //设置 基础设置
        {
          path: '/basicSetUp',
          name: 'basicSetUp',
          component: resolve => require(['@/components/setup/basicSetUp'], resolve),
        },
        // 物流设置 规则设置
        {
          path: '/ruleSetup',
          name: 'ruleSetup',
          component: resolve => require(['@/components/setup/ruleSetup'], 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: '/labelBar',
          name: 'labelBar',
          component: resolve => require(['@/components/StoreDesign/labelBar'], resolve),
        },
        //店铺管理 小程序页面
        {
          path: '/minipage',
          name: 'minipage',
          component: resolve => require(['@/components/StoreDesign/minipage'], resolve),
        }, //店铺管理 小程序页面标题
        {
          path: '/minititle',
          name: 'minititle',
          component: resolve => require(['@/components/StoreDesign/minititle'], resolve),
        }
        , //店铺管理 版权设置
        {
          path: '/copyrightset',
          name: 'copyrightset',
          component: resolve => require(['@/components/StoreDesign/copyrightset'], resolve),
        },
        //店铺管理 用户中心
        {
          path: '/userCenter',
          name: 'userCenter',
          component: resolve => require(['@/components/StoreDesign/userCenter'], resolve),
        }
      ]
    },

  ]
})
