/*
 * @Author: wenjie 1454560336@qq.com
 * @Date: 2024-03-05 11:36:07
 * @LastEditors: wenjie 1454560336@qq.com
 * @LastEditTime: 2024-11-07 10:01:35
 * @FilePath: \admin-manage\src\router\index.js
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
import operationLayout from '@/views/operationManage/index'

/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
 */

/**
 * constantRoutes
 * a base page that does not have permission requirements
 * all roles can be accessed
 */
export let constantRoutes = [{
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },
  // {
  //   id: 0,
  //   path: '/statisticsManage',
  //   component: Layout,
  //   meta: { title: '中数❤移动', icon: 'icon-shouyefill' },
  //   children: [
  //     {
  //       id: 1,
  //       path: '/statisticsManage',
  //       name: '/statisticsManage',
  //       component: () => import('@/views/statisticsManage/index.vue'),
  //       meta: { title: '中数❤移动', icon: '' },
  //     },

  //   ]
  // },
  {
    id: 0,
    path: '/',
    component: Layout,
    redirect: '/home',
    meta: {
      title: '首页',
      icon: 'icon-shouyefill'
    },
    children: [{
        id: 1,
        path: '/home',
        name: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          icon: ''
        },
      },
      {
        id: 2,
        path: '/updatePassword',
        name: '/updatePassword',
        component: () => import('@/views/updatePassword/index.vue'),
        meta: {
          title: '修改密码',
          icon: ''
        },
      },
    ]
  },
  {
    id: 0,
    path: '/authorityManage',
    component: Layout,
    meta: {
      title: '权限管理',
      icon: 'icon-shouyefill'
    },
    children: [
      {
        id: 1,
        path: '/authorityManage/menuList',
        name: '/authorityManage/menuList',
        component: () => import('@/views/authorityManage/menuList.vue'),
        meta: {
          title: '菜单列表',
          icon: ''
        },
      },
      {
        id: 2,
        path: '/authorityManage/roleList',
        name: '/authorityManage/roleList',
        component: () => import('@/views/authorityManage/roleList.vue'),
        meta: {
          title: '角色列表',
          icon: ''
        },
      },
      {
        id: 2,
        path: '/authorityManage/userList',
        name: '/authorityManage/userList',
        component: () => import('@/views/authorityManage/userList.vue'),
        meta: {
          title: '用户列表',
          icon: ''
        },
      },
    ]
  },
  // {
  //   id: 36,
  //   path: '/adminManage',
  //   component: Layout,
  //   meta: { title: '账号管理', icon: 'el-icon-user-solid' },
  //   alwaysShow: true,
  //   children: [
  //     {
  //       id: 37,
  //       path: '/adminManage/adminList',
  //       name: '/adminManage/adminList',
  //       component: () => import('@/views/adminManage/adminList.vue'),
  //       meta: { title: '账号列表', icon: '' },
  //     },
  //     {
  //       id: 37,
  //       path: '/adminManage/adminDetail',
  //       name: '/adminManage/adminDetail',
  //       hidden: true ,
  //       component: () => import('@/views/adminManage/adminDetail.vue'),
  //       meta: { title: '账号详情', icon: '',activeMenu:'/adminManage/adminList' },
  //     },
  //     {
  //       id: 37,
  //       path: '/adminManage/adminAdd',
  //       name: '/adminManage/adminAdd',
  //       hidden: true ,
  //       component: () => import('@/views/adminManage/adminAdd.vue'),
  //       meta: { title: '人员添加', icon: '',activeMenu:'/adminManage/adminList' },
  //     },
  //   ]
  // },

  {
    id: 0,
    path: '/operationManage/index',
    component: Layout,
    meta: {
      title: '运营管理',
      icon: 'el-icon-s-shop'
    },
    alwaysShow: true,
    children: [{
        id: 0,
        path: '/operationManage/shopManage/index',
        component: operationLayout,
        meta: {
          title: '商铺管理',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/operationManage/shopManage/shopType',
            name: '/operationManage/shopManage/shopType',
            component: () => import('@/views/operationManage/shopManage/shopType.vue'),
            hidden:true,
            meta: {
              title: '店铺类型',
              icon: ''
            },
          },{
            id: 1,
            path: '/operationManage/shopManage/index',
            name: '/operationManage/shopManage/index',
            component: () => import('@/views/operationManage/shopManage/index.vue'),
            meta: {
              title: '店铺列表',
              icon: ''
            },
          },

          {
            id: 1,
            path: '/operationManage/shopManage/shopAdd',
            name: '/operationManage/shopManage/shopAdd',
            component: () => import('@/views/operationManage/shopManage/shopAdd.vue'),
            meta: {
              title: '店铺添加'
            },
          },
          {
            id: 1,
            path: '/operationManage/shopManage/shopAdd1',
            name: '/operationManage/shopManage/shopAdd1',
            hidden: true,
            component: () => import('@/views/operationManage/shopManage/shopAdd1.vue'),
            meta: {
              title: '银联认证',
              activeMenu: '/operationManage/shopManage/index'

            },
          },
          {
            id: 1,
            path: '/operationManage/shopManage/shopAdd2',
            name: '/operationManage/shopManage/shopAdd2',
            hidden: true,
            component: () => import('@/views/operationManage/shopManage/shopAdd2.vue'),
            meta: {
              title: '银联认证',
              activeMenu: '/operationManage/shopManage/index'

            },
          },
          {
            id: 1,
            path: '/operationManage/shopManage/shopAdd3',
            name: '/operationManage/shopManage/shopAdd3',
            hidden: true,
            component: () => import('@/views/operationManage/shopManage/shopAdd3.vue'),
            meta: {
              title: '银联认证',
              activeMenu: '/operationManage/shopManage/index'

            },
          },
          {
            id: 1,
            path: '/operationManage/shopManage/shopAdd4',
            name: '/operationManage/shopManage/shopAdd4',
            hidden: true,
            component: () => import('@/views/operationManage/shopManage/shopAdd4.vue'),
            meta: {
              title: '银联认证',
              activeMenu: '/operationManage/shopManage/index'

            },
          }
        ]
      },
      // {
      //   id: 0,
      //   path: '/operationManage/shopAudit/index',
      //   component: operationLayout,
      //   meta: {
      //     title: '店铺审核',
      //     icon: ''
      //   },
      //   alwaysShow: true,
      //   children: [{
      //       id: 1,
      //       path: '/operationManage/shopAudit/index',
      //       name: '/operationManage/shopAudit/index',
      //       component: () => import('@/views/operationManage/shopAudit/index.vue'),
      //       meta: {
      //         title: '审核列表',
      //         icon: ''
      //       },
      //     },
      //     {
      //       id: 1,
      //       path: '/operationManage/shopAudit/audit',
      //       name: '/operationManage/shopAudit/audit',
      //       hidden:true,
      //       component: () => import('@/views/operationManage/shopAudit/audit.vue'),
      //       meta: {
      //         title: '店铺审核',
      //         icon: '',
      //         activeMenu: '/operationManage/shopAudit/index'
      //       },
      //     },
      //   ]
      // },
      // {
      //   id: 0,
      //   path: '/operationManage/goodsTemplate/index',
      //   component: operationLayout,
      //   meta: {
      //     title: '规格模板',
      //     icon: ''
      //   },
      //   alwaysShow: true,
      //   children: [{
      //       id: 1,
      //       path: '/operationManage/goodsTemplate/index',
      //       name: '/operationManage/goodsTemplate/index',
      //       component: () => import('@/views/operationManage/goodsTemplate/index.vue'),
      //       meta: {
      //         title: '商品规格',
      //         icon: ''
      //       },
      //     },
      //     {
      //       id: 1,
      //       path: '/operationManage/goodsTemplate/addGoodsTemplate',
      //       name: '/operationManage/goodsTemplate/addGoodsTemplate',
      //       hidden:true,
      //       component: () => import('@/views/operationManage/goodsTemplate/addGoodsTemplate.vue'),
      //       meta: {
      //         title: '添加规格',
      //         icon: '',
      //         activeMenu: '/operationManage/goodsTemplate/index'
      //       },
      //     },
      //   ]
      // },
      {
        id: 0,
        path: '/operationManage/goodsType/index',
        component: operationLayout,
        meta: {
          title: '商品分类',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/goodsType/index',
            name: '/operationManage/goodsType/index',
            component: () => import('@/views/operationManage/goodsType/index.vue'),
            meta: {
              title: '分类列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/goodsType/addGoodsType',
            name: '/operationManage/goodsType/addGoodsType',
            hidden:true,
            component: () => import('@/views/operationManage/goodsType/addGoodsType.vue'),
            meta: {
              title: '添加分类',
              icon: '',
              activeMenu: '/operationManage/goodsType/index'
            },
          },
        ]
      },
      {
        id: 0,
        path: '/operationManage/goodsManage/index',
        component: operationLayout,
        meta: {
          title: '商品管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/goodsManage/index',
            name: '/operationManage/goodsManage/index',
            component: () => import('@/views/operationManage/goodsManage/index.vue'),
            meta: {
              title: '商品列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/goodsManage/goodsDetail',
            name: '/operationManage/goodsManage/goodsDetail',
            hidden:true,
            component: () => import('@/views/operationManage/goodsManage/goodsDetail.vue'),
            meta: {
              title: '商品配置',
              icon: '',
              activeMenu: '/operationManage/goodsManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/goodsManage/labelList',
            name: '/operationManage/goodsManage/labelList',
            component: () => import('@/views/operationManage/goodsManage/labelList.vue'),
            meta: {
              title: '标签列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/goodsManage/productLibrary',
            name: '/operationManage/goodsManage/productLibrary',
            component: () => import('@/views/operationManage/goodsManage/productLibrary.vue'),
            meta: {
              title: '产品库',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/goodsManage/homeGoodsSet',
            name: '/operationManage/goodsManage/homeGoodsSet',
            component: () => import('@/views/operationManage/goodsManage/homeGoodsSet.vue'),
            meta: {
              title: '首页设置',
              icon: ''
            },
          },
        ]
      },
      // {
      //   id: 0,
      //   path: '/operationManage/goodsAudit/index',
      //   component: operationLayout,
      //   meta: {
      //     title: '商品审核',
      //     icon: ''
      //   },
      //   alwaysShow: true,
      //   children: [{
      //       id: 1,
      //       path: '/operationManage/goodsAudit/index',
      //       name: '/operationManage/goodsAudit/index',
      //       component: () => import('@/views/operationManage/goodsAudit/index.vue'),
      //       meta: {
      //         title: '审核列表',
      //         icon: ''
      //       },
      //     },
      //     {
      //       id: 1,
      //       path: '/operationManage/goodsAudit/auditGoods',
      //       name: '/operationManage/goodsAudit/auditGoods',
      //       hidden:true,
      //       component: () => import('@/views/operationManage/goodsAudit/auditGoods.vue'),
      //       meta: {
      //         title: '商品审核',
      //         icon: '',
      //         activeMenu: '/operationManage/goodsAudit/index'
      //       },
      //     },
      //     // {
      //     //   id: 1,
      //     //   path: '/operationManage/goodsAudit/auditDetail',
      //     //   name: '/operationManage/goodsAudit/auditDetail',
      //     //   component: () => import('@/views/operationManage/goodsAudit/auditDetail.vue'),
      //     //   meta: {
      //     //     title: '审核详情',
      //     //     icon: ''
      //     //   },
      //     // },
      //   ]
      // },
      {
        id: 0,
        path: '/operationManage/orderManage/index',
        component: operationLayout,
        meta: {
          title: '订单管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
          id: 1,
          path: '/operationManage/orderManage/index',
          name: '/operationManage/orderManage/index',
          component: () => import('@/views/operationManage/orderManage/index.vue'),
          meta: {
            title: '支付订单',
            icon: ''
          },
        },
        {
          id: 1,
          path: '/operationManage/orderManage/payDetail',
          name: '/operationManage/orderManage/payDetail',
          hidden:true,
          component: () => import('@/views/operationManage/orderManage/payDetail.vue'),
          meta: {
            title: '订单详情',
            icon: '',
            activeMenu: '/operationManage/orderManage/index'
          },
        },
        {
          id: 1,
          path: '/operationManage/orderManage/list',
          name: '/operationManage/orderManage/list',
          component: () => import('@/views/operationManage/orderManage/list.vue'),
          meta: {
            title: '商品订单',
            icon: ''
          },
        },
        {
          id: 1,
          path: '/operationManage/orderManage/orderDetail',
          name: '/operationManage/orderManage/orderDetail',
          hidden:true,
          component: () => import('@/views/operationManage/orderManage/orderDetail.vue'),
          meta: {
            title: '订单详情',
            icon: '',
            activeMenu: '/operationManage/orderManage/list'
          },
        },

       ]
      },
      {
        id: 0,
        path: '/operationManage/marketingManage/index',
        component: operationLayout,
        meta: {
          title: '营销管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
          id: 1,
          path: '/operationManage/marketingManage/index',
          name: '/operationManage/marketingManage/index',
          component: () => import('@/views/operationManage/marketingManage/index.vue'),
          meta: {
            title: '小桔活动',
            icon: ''
          },
        },
        {
          id: 0,
          path: '/operationManage/marketingManage/invitePromotion/index',
          component: operationLayout,
          meta: {
            title: '推广邀请规则',
            icon: ''
          },
          alwaysShow: true,
          children: [
            {
              id: 1,
              path: '/operationManage/marketingManage/invitePromotion/index',
              name: '/operationManage/marketingManage/invitePromotion/index',
              component: () => import('@/views/operationManage/marketingManage/invitePromotion/index.vue'),
              meta: {
                title: '规则管理',
                icon: ''
              },
            },
            {
              id: 1,
              path: '/operationManage/marketingManage/invitePromotion/add',
              name: '/operationManage/marketingManage/invitePromotion/add',
              component: () => import('@/views/operationManage/marketingManage/invitePromotion/add.vue'),
              meta: {
                title: '规则添加',
                icon: ''
              },
            }
          ]
        }
      ]
      },
      {
        id: 0,
        path: '/operationManage/comboManage/index',
        component: operationLayout,
        meta: {
          title: '套餐管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/comboManage/index',
            name: '/operationManage/comboManage/index',
            component: () => import('@/views/operationManage/comboManage/index.vue'),
            meta: {
              title: '套餐列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/comboManage/logList',
            name: '/operationManage/comboManage/logList',
            component: () => import('@/views/operationManage/comboManage/logList.vue'),
            meta: {
              title: '权益记录',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/comboManage/vipActivation',
            name: '/operationManage/comboManage/vipActivation',
            component: () => import('@/views/operationManage/comboManage/vipActivation.vue'),
            meta: {
              title: '会员激活码',
              icon: ''
            },
          },
          // {
          //   id: 1,
          //   path: '/operationManage/comboManage/addCombo',
          //   name: '/operationManage/comboManage/addCombo',
          //   component: () => import('@/views/operationManage/comboManage/addCombo.vue'),
          //   meta: {
          //     title: '添加套餐',
          //     icon: ''
          //   },
          // },
          {
            id: 1,
            path: '/operationManage/comboManage/editCombo',
            name: '/operationManage/comboManage/editCombo',
            hidden:true,
            component: () => import('@/views/operationManage/comboManage/editCombo.vue'),
            meta: {
              title: '编辑套餐',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/equitiesManage/index',
            name: '/operationManage/equitiesManage/index',
            component: () => import('@/views/operationManage/equitiesManage/index.vue'),
            hidden:true,
            meta: {
              title: '权益列表',
              icon: '',
              activeMenu: '/operationManage/comboManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/equitiesManage/addEquities',
            name: '/operationManage/equitiesManage/addEquities',
            hidden:true,
            component: () => import('@/views/operationManage/equitiesManage/addEquities.vue'),
            meta: {
              title: '添加权益',
              icon: '',
              activeMenu: '/operationManage/comboManage/index'

            },
          },
          {
            id: 1,
            path: '/operationManage/comboManage/checkoutCode',
            name: '/operationManage/comboManage/checkoutCode',
            component: () => import('@/views/operationManage/comboManage/checkoutCode.vue'),
            hidden:true,
            meta: {
              title: '查看激活码',
              icon: '',
              activeMenu: '/operationManage/comboManage/vipActivation'
            },
          },
        ]
      },

      {
        id: 0,
        path: '/operationManage/financeManage/index',
        component: operationLayout,
        meta: {
          title: '财务管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
          id: 1,
          path: '/operationManage/financeManage/index',
          name: '/operationManage/financeManage/index',
          component: () => import('@/views/operationManage/financeManage/index.vue'),
          meta: {
            title: '分账列表',
            icon: ''
          },
        },
        {
          id: 1,
          path: '/operationManage/financeManage/withdraw',
          name: '/operationManage/financeManage/withdraw',
          component: () => import('@/views/operationManage/financeManage/withdraw.vue'),
          meta: {
            title: '账户余额',
            icon: ''
          },
        },
      ]
      },
      // {
      //   id: 0,
      //   path: '/operationManage/ticketManage/index',
      //   component: operationLayout,
      //   meta: {
      //     title: '核销管理',
      //     icon: ''
      //   },
      //   alwaysShow: true,
      //   children: [{
      //     id: 1,
      //     path: '/operationManage/ticketManage/index',
      //     name: '/operationManage/ticketManage/index',
      //     component: () => import('@/views/operationManage/ticketManage/index.vue'),
      //     meta: {
      //       title: '核销列表',
      //       icon: ''
      //     },
      //   }, ]
      // },
      {
        id: 0,
        path: '/operationManage/appMenuManage/index',
        component: operationLayout,
        meta: {
          title: '小程序菜单',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/appMenuManage/index',
            name: '/operationManage/appMenuManage/index',
            component: () => import('@/views/operationManage/appMenuManage/index.vue'),
            meta: {
              title: '菜单列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/appMenuManage/addMenu',
            name: '/operationManage/appMenuManage/addMenu',
            hidden:true,
            component: () => import('@/views/operationManage/appMenuManage/addMenu.vue'),
            meta: {
              title: '添加菜单',
              icon: '',
              activeMenu: '/operationManage/appMenuManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/appMenuManage/editMenu',
            name: '/operationManage/appMenuManage/editMenu',
            hidden:true,
            component: () => import('@/views/operationManage/appMenuManage/editMenu.vue'),
            meta: {
              title: '编辑菜单',
              icon: '',
              activeMenu: '/operationManage/appMenuManage/index'
            },
          },
        ]
      },
      {
        id: 0,
        path: '/operationManage/bannerManage/index',
        component: operationLayout,
        meta: {
          title: 'banner管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/bannerManage/index',
            name: '/operationManage/bannerManage/index',
            component: () => import('@/views/operationManage/bannerManage/index.vue'),
            meta: {
              title: 'banner列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/bannerManage/addBanner',
            name: '/operationManage/bannerManage/addBanner',
            hidden:true,
            component: () => import('@/views/operationManage/bannerManage/addBanner.vue'),
            meta: {
              title: '添加banner',
              icon: '',
              activeMenu: '/operationManage/bannerManage/index'

            },
          },
          {
            id: 1,
            path: '/operationManage/bannerManage/editBanner',
            name: '/operationManage/bannerManage/editBanner',
            hidden:true,
            component: () => import('@/views/operationManage/bannerManage/editBanner.vue'),
            meta: {
              title: '编辑banner',
              icon: '',
              activeMenu: '/operationManage/bannerManage/index'
            },
          },
        ]
      },
      {
        id: 0,
        path: '/operationManage/advertisingManage/index',
        component: operationLayout,
        meta: {
          title: '广告位管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/advertisingManage/index',
            name: '/operationManage/advertisingManage/index',
            component: () => import('@/views/operationManage/advertisingManage/index.vue'),
            meta: {
              title: '广告位列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/advertisingManage/addAdv',
            name: '/operationManage/advertisingManage/addAdv',
            hidden:true,
            component: () => import('@/views/operationManage/advertisingManage/addAdv.vue'),
            meta: {
              title: '添加广告位',
              icon: '',
              activeMenu: '/operationManage/advertisingManage/index'

            },
          },
          {
            id: 1,
            path: '/operationManage/advertisingManage/editAdv',
            name: '/operationManage/advertisingManage/editAdv',
            hidden:true,
            component: () => import('@/views/operationManage/advertisingManage/editAdv.vue'),
            meta: {
              title: '编辑广告位',
              icon: '',
              activeMenu: '/operationManage/advertisingManage/index'
            },
          },
        ]
      },
      {
        id: 0,
        path: '/operationManage/couponManage/index',
        component: operationLayout,
        meta: {
          title: '优惠券管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/couponManage/index',
            name: '/operationManage/couponManage/index',
            component: () => import('@/views/operationManage/couponManage/index.vue'),
            meta: {
              title: '优惠券列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/couponManage/fullDiscountCoupon',
            name: '/operationManage/couponManage/fullDiscountCoupon',
            component: () => import('@/views/operationManage/couponManage/fullDiscountCoupon.vue'),
            hidden:true,
            meta: {
              title: '满减优惠券',
              icon: '',
              activeMenu: '/operationManage/couponManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/couponManage/discountCoupon',
            name: '/operationManage/couponManage/discountCoupon',
            component: () => import('@/views/operationManage/couponManage/discountCoupon.vue'),
            hidden:true,
            meta: {
              title: '折扣优惠券',
              icon: '',
              activeMenu: '/operationManage/couponManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/couponManage/refuelCoupon',
            name: '/operationManage/couponManage/refuelCoupon',
            component: () => import('@/views/operationManage/couponManage/refuelCoupon.vue'),
            hidden:true,
            meta: {
              title: '加油优惠券',
              icon: '',
              activeMenu: '/operationManage/couponManage/index'

            },
          },

        ]
      },
      {
        id: 0,
        path: '/operationManage/luckyDrawManage/index',
        component: operationLayout,
        meta: {
          title: '抽奖管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/luckyDrawManage/index',
            name: '/operationManage/luckyDrawManage/index',
            component: () => import('@/views/operationManage/luckyDrawManage/index.vue'),
            meta: {
              title: '抽奖列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/luckyDrawManage/addLuckyDraw',
            name: '/operationManage/luckyDrawManage/addLuckyDraw',
            hidden:true,
            component: () => import('@/views/operationManage/luckyDrawManage/addLuckyDraw.vue'),
            meta: {
              title: '添加抽奖',
              icon: '',
              activeMenu: '/operationManage/luckyDrawManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/luckyDrawManage/dataList',
            name: '/operationManage/luckyDrawManage/dataList',
            hidden:true,
            component: () => import('@/views/operationManage/luckyDrawManage/dataList.vue'),
            meta: {
              title: '中奖数据',
              icon: '',
              activeMenu: '/operationManage/luckyDrawManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/luckyDrawManage/luckyDrawRule',
            name: '/operationManage/luckyDrawManage/luckyDrawRule',
            hidden:true,
            component: () => import('@/views/operationManage/luckyDrawManage/luckyDrawRule.vue'),
            meta: {
              title: '活动规则',
              icon: '',
              activeMenu: '/operationManage/luckyDrawManage/index'
            },
          },
        ]
      },
      {
        id: 0,
        path: '/operationManage/activityManage/index',
        component: operationLayout,
        meta: {
          title: '活动管理',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/activityManage/index',
            name: '/operationManage/activityManage/index',
            component: () => import('@/views/operationManage/activityManage/index.vue'),
            meta: {
              title: '活动列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/activityManage/addActivity',
            name: '/operationManage/activityManage/addActivity',
            hidden:true,
            component: () => import('@/views/operationManage/activityManage/addActivity.vue'),
            meta: {
              title: '添加活动',
              icon: '',
              activeMenu: '/operationManage/activityManage/index'
            },
          },
          {
            id: 1,
            path: '/operationManage/activityManage/dataList',
            name: '/operationManage/activityManage/dataList',
            hidden:true,
            component: () => import('@/views/operationManage/activityManage/dataList.vue'),
            meta: {
              title: '报名详情',
              icon: '',
              activeMenu: '/operationManage/activityManage/index'
            },
          },
        ]
      },
      {
        id: 0,
        path: '/operationManage/templateManage/index',
        component: operationLayout,
        meta: {
          title: '数据采集模板',
          icon: ''
        },
        alwaysShow: true,
        children: [{
            id: 1,
            path: '/operationManage/templateManage/index',
            name: '/operationManage/templateManage/index',
            component: () => import('@/views/operationManage/templateManage/index.vue'),
            meta: {
              title: '模板列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/operationManage/templateManage/addTemplate',
            name: '/operationManage/templateManage/addTemplate',
            hidden:true,
            component: () => import('@/views/operationManage/templateManage/addTemplate.vue'),
            meta: {
              title: '添加模板',
              icon: '',
              activeMenu: '/operationManage/templateManage/index'
            },
          },
        ]
      },

      // {
      //   id: 0,
      //   path: '/operationManage/noticeManage/index',
      //   component: operationLayout,
      //   meta: {
      //     title: '通知管理',
      //     icon: ''
      //   },
      //   alwaysShow: true,
      //   children: [{
      //       id: 1,
      //       path: '/operationManage/noticeManage/index',
      //       name: '/operationManage/noticeManage/index',
      //       component: () => import('@/views/operationManage/noticeManage/index.vue'),
      //       meta: {
      //         title: '通知列表',
      //         icon: ''
      //       },
      //     },
      //     {
      //       id: 1,
      //       path: '/operationManage/noticeManage/addBanner',
      //       name: '/operationManage/noticeManage/addBanner',
      //       component: () => import('@/views/operationManage/noticeManage/addNotice.vue'),
      //       meta: {
      //         title: '添加通知',
      //         icon: ''
      //       },
      //     },
      //     {
      //       id: 1,
      //       path: '/operationManage/noticeManage/editBanner',
      //       name: '/operationManage/noticeManage/editBanner',
      //       component: () => import('@/views/operationManage/noticeManage/editNotice.vue'),
      //       meta: {
      //         title: '编辑通知',
      //         icon: ''
      //       },
      //     },
      //   ]
      // },
    ]
  },
  {
    id: 0,
    path: '/studyManage/index',
    component: Layout,
    meta: {
      title: '研学管理',
      icon: 'el-icon-s-shop'
    },
    alwaysShow: true,
    children: [
      {
        id: 0,
        path: '/studyManage/bannerManage/index',
        component: operationLayout,
        meta: {
          title: 'banner管理',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/studyManage/bannerManage/index',
            name: '/studyManage/bannerManage/index',
            component: () => import('@/views/studyManage/bannerManage/index.vue'),
            meta: {
              title: 'banner列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/studyManage/bannerManage/addBanner',
            name: '/studyManage/bannerManage/addBanner',
            hidden:true,
            component: () => import('@/views/studyManage/bannerManage/addBanner.vue'),
            meta: {
              title: '添加banner',
              icon: '',
              activeMenu: '/studyManage/bannerManage/index'
            },
          }
        ]
      },
      {
        id: 0,
        path: '/studyManage/menuManage/index',
        component: operationLayout,
        meta: {
          title: '栏目管理',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/studyManage/menuManage/index',
            name: '/studyManage/menuManage/index',
            component: () => import('@/views/studyManage/menuManage/index.vue'),
            meta: {
              title: '栏目列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/studyManage/menuManage/addMenu',
            name: '/studyManage/menuManage/addMenu',
            hidden:true,
            component: () => import('@/views/studyManage/menuManage/addMenu.vue'),
            meta: {
              title: '添加栏目',
              icon: '',
              activeMenu: '/studyManage/menuManage/index'
            },
          }
        ]
      },
      {
        id: 0,
        path: '/studyManage/courseManage/index',
        component: operationLayout,
        meta: {
          title: '课程管理',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/studyManage/courseManage/index',
            name: '/studyManage/courseManage/index',
            component: () => import('@/views/studyManage/courseManage/index.vue'),
            meta: {
              title: '课程列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/studyManage/courseManage/addCourse',
            name: '/studyManage/courseManage/addCourse',
            hidden:true,
            component: () => import('@/views/studyManage/courseManage/addCourse.vue'),
            meta: {
              title: '添加课程',
              icon: '',
              activeMenu: '/studyManage/courseManage/index'
            },
          }
        ]
      },
      {
        id: 0,
        path: '/studyManage/tabManage/index',
        component: operationLayout,
        meta: {
          title: '社区标签',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/studyManage/tabManage/index',
            name: '/studyManage/tabManage/index',
            component: () => import('@/views/studyManage/tabManage/index.vue'),
            meta: {
              title: '标签列表',
              icon: ''
            },
          },
        ]
      },
      {
        id: 0,
        path: '/studyManage/communityManage/index',
        component: operationLayout,
        meta: {
          title: '社区管理',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/studyManage/communityManage/index',
            name: '/studyManage/communityManage/index',
            component: () => import('@/views/studyManage/communityManage/index.vue'),
            meta: {
              title: '文章列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/studyManage/communityManage/addArticle',
            name: '/studyManage/communityManage/addArticle',
            hidden:true,
            component: () => import('@/views/studyManage/communityManage/addArticle.vue'),
            meta: {
              title: '添加文章',
              icon: '',
              activeMenu: '/studyManage/communityManage/index'
            },
          }
        ]
      },
      {
        id: 0,
        path: '/studyManage/questionBankManage/index',
        component: operationLayout,
        meta: {
          title: '试题管理',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/studyManage/questionBankManage/index',
            name: '/studyManage/questionBankManage/index',
            component: () => import('@/views/studyManage/questionBankManage/index.vue'),
            meta: {
              title: '题库列表',
              icon: ''
            },
          },
          {
            id: 1,
            path: '/studyManage/questionBankManage/editQuestions',
            name: '/studyManage/questionBankManage/editQuestions',
            hidden:true,
            component: () => import('@/views/studyManage/questionBankManage/editQuestions.vue'),
            meta: {
              title: '编辑试卷',
              icon: '',
              activeMenu: '/studyManage/questionBankManage/index'
            },
          },
        ]
      },
      {
        id: 0,
        path: '/studyManage/subscribeManage/index',
        component: operationLayout,
        meta: {
          title: '预约管理',
          icon: ''
        },
        alwaysShow: true,
        children: [
          {
            id: 1,
            path: '/studyManage/subscribeManage/index',
            name: '/studyManage/subscribeManage/index',
            component: () => import('@/views/studyManage/subscribeManage/index.vue'),
            meta: {
              title: '预约列表',
              icon: ''
            },
          },
        ]
      },
    ]
    },

    {
      id: 0,
      path: '/merchantManage/index',
      component: Layout,
      redirect: '/merchantManage/index',
      meta: {
        title: '商户管理',
        icon: 'el-icon-s-shop'
      },
      children: [{
          id: 1,
          path: '/merchantManage/index',
          name: '/merchantManage/index',
          component: () => import('@/views/merchantManage/index.vue'),
          meta: {
            title: '商户列表',
            icon: ''
          },
        },
        {
          id: 1,
          path: '/merchantManage/shopDetail',
          name: '/merchantManage/shopDetail',
          component: () => import('@/views/merchantManage/shopDetail.vue'),
          hidden:true,
          meta: {
            title: '商户详情',
            icon: '',
            activeMenu:'/merchantManage/index'
          },
        },
        {
          id: 1,
          hidden:true,
          path: '/merchantManage/addUser',
          name: '/merchantManage/addUser',
          component: () => import('@/views/merchantManage/addUser.vue'),
          meta: {
            title: '添加商户',
            icon: ''
          },
        },
      ]
    },
  // 用户管理
  {
    id: 0,
    path: '/userManage/index',
    component: Layout,
    meta: {
      title: '用户管理',
      icon: 'el-icon-s-shop'
    },
    alwaysShow: true,
    children:[
      // {
      //   id: 0,
      //   path: '/userManage/agentManage',
      //   component: operationLayout,
      //   redirect: '/userManage/agentManage',
      //   meta: {
      //     title: '渠道商',
      //     icon: ''
      //   },
      //   children: [{
      //       id: 1,
      //       path: '/userManage/agentManage/index',
      //       name: '/userManage/agentManage/index',
      //       component: () => import('@/views/userManage/agentManage/index.vue'),
      //       meta: {
      //         title: '渠道商列表',
      //         icon: ''
      //       },
      //     },
      //     {
      //       id: 1,
      //       path: '/userManage/agentManage/addAgent',
      //       name: '/userManage/agentManage/addAgent',
      //       hidden:true,
      //       component: () => import('@/views/userManage/agentManage/addAgent.vue'),
      //       meta: {
      //         title: '添加渠道商',
      //         icon: ''
      //       },
      //     },
      //     {
      //       id: 1,
      //       path: '/userManage/agentManage/editAgent',
      //       name: '/userManage/agentManage/editAgent',
      //       hidden:true,
      //       component: () => import('@/views/userManage/agentManage/editAgent.vue'),
      //       meta: {
      //         title: '编辑渠道商',
      //         icon: ''
      //       },
      //     },
      //   ]
      // },
      {
        id: 0,
        path: '/userManage/memberManage',
        component: operationLayout,
        redirect: '/userManage/memberManage',
        meta: {
          title: '会员管理',
          icon: ''
        },
        children: [{
            id: 1,
            path: '/userManage/memberManage/index',
            name: '/userManage/memberManage/index',
            component: () => import('@/views/userManage/memberManage/index.vue'),
            meta: {
              title: '会员列表',
              icon: ''
            },
          },
          // {
          //   id: 1,
          //   path: '/userManage/memberManage/memberDetail',
          //   name: '/userManage/memberManage/memberDetail',
          //   component: () => import('@/views/userManage/memberManage/memberDetail.vue'),
          //   meta: {
          //     title: '会员详情',
          //     icon: ''
          //   },
          // },
        ]
      },
      // {
      //   id: 0,
      //   path: '/userManage/userList',
      //   component: operationLayout,
      //   redirect: '/userManage/userList',
      //   meta: {
      //     title: '会员管理',
      //     icon: ''
      //   },
      //   children: [{
      //       id: 1,
      //       path: '/userManage/userList/index',
      //       name: '/userManage/userList/index',
      //       component: () => import('@/views/userManage/userList/index.vue'),
      //       meta: {
      //         title: '用户列表',
      //         icon: ''
      //       },
      //     },
      //   ]
      // },
    ]
  },

  {
    id: 0,
    path: '/setting/index',
    component: Layout,
    meta: {
      title: '系统设置',
      icon: 'el-icon-s-shop'
    },
    alwaysShow: true,
    children:[
      {
              id: 0,
              path: '/setting/rulesManage',
              component: operationLayout,
              meta: {
                title: '分账规则',
                icon: ''
              },
              children: [{
                  id: 1,
                  path: '/setting/rulesManage',
                  name: '/setting/rulesManage',
                  component: () => import('@/views//setting/rulesManage/index.vue'),
                  meta: {
                    title: '规则列表',
                    icon: ''
                  },
                },
              ]
      },
      {
        id: 1,
        path: '/setting/synchronization',
        name: '/setting/synchronization',
        component: () => import('@/views/setting/synchronization.vue'),
        meta: {
          title: '同步管理',
          icon: ''
        },
      },
      {
        id: 1,
        path: '/setting/cityList',
        name: '/setting/cityList',
        component: () => import('@/views/setting/cityList.vue'),
        meta: {
          title: '城市列表',
          icon: ''
        },
      },
      // {
      //   id: 0,
      //   path: '/setting/commissionManage',
      //   component: operationLayout,
      //   meta: {
      //     title: '渠道佣金',
      //     icon: ''
      //   },
      //   children: [{
      //       id: 1,
      //       path: '/setting/commissionManage',
      //       name: '/setting/commissionManage',
      //       component: () => import('@/views//setting/commissionManage/index.vue'),
      //       meta: {
      //         title: '渠道佣金',
      //         icon: ''
      //       },
      //     },
      //   ]
      // },
      {
        id: 0,
        path: '/setting/setting',
        component: operationLayout,
        meta: {
          title: '账号设置',
          icon: ''
        },
        children: [{
            id: 1,
            path: '/setting/setting',
            name: '/setting/setting',
            component: () => import('@/views//setting/setting.vue'),
            meta: {
              title: '账号设置',
              icon: ''
            },
          },
        ]
      },
      {
        id: 0,
        path: '/setting/base',
        component: operationLayout,
        meta: {
          title: '通用设置',
          icon: ''
        },
        children: [{
            id: 0,
            path: '/setting/base',
            name: '/setting/base',
            component: () => import('@/views/setting/base.vue'),
            meta: {
              title: '通用设置',
              icon: ''
            },
          },
        ]
      }
    ]
  }

  // 404 page must be placed at the end !!!
  // { path: '*', redirect: '/404', hidden: true }
]

export const asyncRouter = [


]

const createRouter = () => new Router({
  // mode: 'history', // require service support
  scrollBehavior: () => ({
    y: 0
  }),
  routes: constantRoutes
})

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
  const newRouter = createRouter()
  router.matcher = newRouter.matcher // reset router
}

export default router
