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: '/basicSetUp',
      name: 'basicSetUp',
      component: resolve => require(['@/components/setUp/basicSetUp'], 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: '/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),
          },



      ]
    },

  ]
})
