import Main from '@/components/main'
import parentView from '@/components/parent-view'
import store from '@/store'

/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  title: { String|Number|Function }
 *         显示在侧边栏、面包屑和标签栏的文字
 *         使用'{{ 多语言字段 }}'形式结合多语言使用，例子看多语言的路由配置;
 *         可以传入一个回调函数，参数是当前路由对象，例子看动态路由和带参路由
 *  hideInBread: (false) 设为true后此级路由将不会出现在面包屑中，示例看QQ群路由配置
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面在切换标签后不会缓存，如果需要缓存，无需设置这个字段，而且需要设置页面组件name属性和路由配置的name一致
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 *  beforeCloseName: (-) 设置该字段，则在关闭当前tab页时会去'@/router/before-close.js'里寻找该字段名对应的方法，作为关闭前的钩子函数
 * }
 */

export default [{
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: () =>
      import('@/view/login/login.vue')
  },
  {
    path: '/forgetPassword',
    name: 'forgetPassword',
    meta: {
      title: '忘记密码',
      hideInMenu: true,
      shop: ['shop']
    },
    component: () =>
      import('@/view/password/forgetPassword')
  },
  {
    path: '/applyShop',
    name: 'applyShop',
    meta: {
      title: '商户入驻申请',
      hideInMenu: true,
      shop: ['shop']
    },
    component: () =>
      import('@/view/shop/shopQuery.vue')
  },
  {
    path: '/shopAgreement',
    name: 'shopAgreement',
    meta: {
      title: '商户服务协议',
      hideInMenu: true,
      shop: ['shop']
    },
    component: () =>
      import('@/view/shop/shopAgreement.vue')
  },
  {
    path: '/privacy',
    name: 'privacy',
    meta: {
      title: '商户隐私协议',
      hideInMenu: true,
      shop: ['shop']
    },
    component: () =>
      import('@/view/shop/privacy.vue')
  },
  {
    path: '/searchShop',
    name: 'searchShop',
    meta: {
      title: '商户入驻申请进度查询',
      hideInMenu: true,
      shop: ['shop']
    },
    component: () =>
      import('@/view/shop/searchShop.vue')
  },
  {
    path: '/shopInfo',
    name: 'shopInfo',
    meta: {
      title: '商户入驻申请',
      hideInMenu: true,
      shop: ['shop']
    },
    component: () =>
      import('@/view/shop/shopInfo.vue')
  },
  {
    path: '/paySuccess',
    name: 'paySuccess',
    meta: {
      title: '商户缴费成功',
      hideInMenu: true,
      shop: ['shop']
    },
    component: () =>
      import('@/view/shop/paySuccess.vue')
  },
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [{
      path: '/home',
      name: 'home',
      meta: {
        hideInMenu: true,
        title: '首页',
        notCache: true,
        icon: 'md-home'
      },
      component: () =>
        import('@/view/home')
    }]
  },
  {
    path: '/good_mgr',
    name: 'good_mgr',
    meta: {
      icon: 'md-basket',
      title: '商品中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'category_management',
        name: 'category_management',
        meta: {
          icon: 'md-list-box',
          title: '类目管理',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/category-management')
      },
      {
        path: 'commodity_audit',
        name: 'commodity_audit',
        meta: {
          icon: 'md-basket',
          title: '商品审核',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/commodity-audit')
      },
      {
        path: 'product_list',
        name: 'product_list',
        meta: {
          icon: 'md-person',
          title: '商品列表',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/product-list')
      },
      {
        path: 'add_good',
        name: 'add_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '商品发布',
          access: ['super']
          // hideInMenu: true,
          // notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-good')
      },
      {
        path: 'update_good',
        name: 'update_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '编辑商品',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-good')
      },
      {
        path: 'again_good',
        name: 'again_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '重新发布商品',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-good')
      },
      {
        path: 'draft_good',
        name: 'draft_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '编辑商品',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-good')
      },
      {
        path: 'good_detail',
        name: 'good_detail',
        meta: {
          icon: 'ios-appstore-outline',
          title: '商品详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-good')
      },
      {
        path: 'commodity_add_good',
        name: 'commodity_add_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '商品发布',
          // access: ['super'],
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-commodity')
      },
      {
        path: 'commodity_update_good',
        name: 'commodity_update_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '编辑商品',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-commodity')
      },
      {
        path: 'commodity_draft_good',
        name: 'commodity_draft_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '编辑商品',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-commodity')
      },
      {
        path: 'commodity_again_good',
        name: 'commodity_again_good',
        meta: {
          icon: 'ios-appstore-outline',
          title: '重新发布商品',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-commodity')
      },
      {
        path: 'commodity_good_detail',
        name: 'commodity_good_detail',
        meta: {
          icon: 'ios-appstore-outline',
          title: '商品详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/add-commodity')
      },
      {
        path: 'integral_list',
        name: 'integral_list',
        meta: {
          icon: 'md-person',
          title: '积分商品列表',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/integral-list')
      },
      {
        path: 'add_integral_good',
        name: 'add_integral_good',
        meta: {
          icon: 'md-person',
          title: '发布积分商品',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/add-integral-good')
      },
      {
        path: 'good_commodity',
        name: 'good_commodity',
        meta: {
          icon: 'md-chatboxes',
          title: '商品评论',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/good-commodity')
      },
      {
        path: 'commodity_pass',
        name: 'commodity_pass',
        meta: {
          icon: 'ios-barcode-outline',
          title: '外部商品通证列表',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/commodity-pass')
      },
      {
        path: 'trading_records',
        name: 'trading_records',
        meta: {
          icon: 'md-chatboxes',
          title: '交易记录',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/good-mgr/trading-records')
      },
      {
        path: 'commodity_allocation',
        name: 'commodity_allocation',
        meta: {
          icon: 'ios-bookmark-outline',
          title: '商品配置',
          access: ['super']
        },
        component: () =>
          import('@/view/good-mgr/commodity-allocation')
      }
    ]
  },
  {
    path: '/message_center',
    name: 'message_center',
    meta: {
      icon: 'ios-chatbubbles',
      title: '消息中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'announcement_list',
        name: 'announcement_list',
        meta: {
          icon: 'md-folder',
          title: '公告列表',
          access: ['super']
        },
        component: () =>
          import('@/view/message-center/announcement-list.vue')
      },
      {
        path: 'add_announcement',
        name: 'add_announcement',
        meta: {
          icon: 'ios-people',
          title: '发布公告',
          access: ['super']
        },
        component: () =>
          import('@/view/message-center/announcement.vue')
      },
      {
        path: 'update_announcement',
        name: 'update_announcement',
        meta: {
          icon: 'ios-people',
          title: '编辑公告',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/message-center/announcement.vue')
      },
      {
        path: 'send_sms',
        name: 'send_sms',
        meta: {
          icon: 'ios-send',
          title: '发送SMS',
          access: ['super']
        },
        component: () =>
          import('@/view/message-center/send-sms.vue')
      },
      {
        path: 'sms_template',
        name: 'sms_template',
        meta: {
          icon: 'ios-ionic',
          title: 'SMS模板',
          access: ['super']
        },
        component: () =>
          import('@/view/message-center/sms-template.vue')
      },
      {
        path: 'smsmessage_list',
        name: 'smsmessage_list',
        meta: {
          icon: 'md-list-box',
          title: 'SMS消息列表',
          access: ['super']
        },
        component: () =>
          import('@/view/message-center/smsmessage-list.vue')
      }
    ]
  },
  {
    path: '/user_mgr',
    name: 'user_mgr',
    meta: {
      icon: 'md-people',
      title: '用户中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'user_list',
        name: 'user_list',
        meta: {
          icon: 'md-contact',
          title: '用户列表',
          access: ['super']
        },
        component: () =>
          import('@/view/user-mgr/user-list.vue')
      },
      {
        path: 'business_listings',
        name: 'business_listings',
        meta: {
          icon: 'md-cloud-circle',
          title: '商户列表',
          access: ['super']
        },
        component: () =>
          import('@/view/user-mgr/business-listings.vue')
      },
      {
        path: 'member',
        name: 'member',
        meta: {
          icon: 'md-person',
          title: '会员设置',
          access: ['super']
        },
        component: () =>
          import('@/view/user-mgr/member.vue')
      },
      {
        path: 'merchant_audit',
        name: 'merchant_audit',
        meta: {
          icon: 'md-person-add',
          title: '商户审核',
          access: ['super']
        },
        component: () =>
          import('@/view/user-mgr/merchant-audit.vue')
      },
      {
        path: 'set_merchant',
        name: 'set_merchant',
        meta: {
          icon: 'ios-browsers-outline',
          title: '商户设置',
          access: ['super']
        },
        component: () =>
          import('@/view/user-mgr/set-merchant.vue')
      }
    ]
  },
  {
    path: '/assets_mgr',
    name: 'assets_mgr',
    meta: {
      icon: 'logo-usd',
      title: '财务中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'points_management',
        name: 'points_management',
        meta: {
          icon: 'md-list-box',
          title: '积分管理',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/points-management.vue')
      },
      {
        path: 'withdrawal_audit',
        name: 'withdrawal_audit',
        meta: {
          icon: 'md-git-merge',
          title: '提现审核',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/withdrawal-audit.vue')
      },
      {
        path: 'merchant_assets',
        name: 'merchant_assets',
        meta: {
          icon: 'md-person',
          title: '商户资产',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/merchant-assets.vue')
      },
      {
        path: 'user_assets',
        name: 'user_assets',
        meta: {
          icon: 'md-log-out',
          title: '用户资产',
          access: ['super']
        },
        component: () => import('@/view/assets-mgr/user-assets.vue')
      },
      {
        path: 'platform_flow',
        name: 'platform_flow',
        meta: {
          icon: 'md-stats',
          title: '平台流水',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/platform-flow.vue')
      },
      {
        path: 'merchant_flow',
        name: 'merchant_flow',
        meta: {
          icon: 'ios-stats',
          title: '商户流水',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/merchant-flow.vue')
      },
      {
        path: 'user_flow',
        name: 'user_flow',
        meta: {
          icon: 'ios-stats-outline',
          title: '用户流水',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/user-flow.vue')
      },
      {
        path: 'integral_management',
        name: 'integral_management',
        meta: {
          icon: 'md-cube',
          title: '积分管理',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/integral-management.vue')
      },
      {
        path: 'payment_received',
        name: 'payment_received',
        meta: {
          icon: 'md-document',
          title: '收付款方式',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/payment-received.vue')
      },
      {
        path: 'revenue_record',
        name: 'revenue_record',
        meta: {
          icon: 'md-stats',
          title: '收益记录',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/revenue-record.vue')
      },
      {
        path: 'transaction_details',
        name: 'transaction_details',
        meta: {
          icon: 'ios-funnel',
          title: '交易记录详情',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/transaction-details.vue')
      },
      {
        path: 'capital_flow',
        name: 'capital_flow',
        meta: {
          icon: 'ios-funnel',
          title: '资产流水',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/capital-flow.vue')
      },
      {
        path: 'platform_bill',
        name: 'platform_bill',
        meta: {
          icon: 'ios-funnel',
          title: '平台账单',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/platform-bill.vue')
      },
      {
        path: 'merchant_management',
        name: 'merchant_management',
        meta: {
          icon: 'ios-funnel',
          title: '商户管理',
          access: ['super']
        },
        component: () =>
          import('@/view/assets-mgr/merchant-management.vue')
      }
    ]
  },

  {
    path: '/order_mgr',
    name: 'order_mgr',
    meta: {
      icon: 'md-paper',
      title: '订单中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'order_list',
        name: 'order_list',
        meta: {
          icon: 'md-paper',
          title: '订单列表',
          access: ['super']
        },
        component: () =>
          import('@/view/order-mgr/order-list.vue')
      },
      {
        path: 'order_detail',
        name: 'order_detail',
        meta: {
          icon: 'md-paper',
          title: '订单详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/order-mgr/order-detail.vue')
      },
      {
        path: 'order_complaints',
        name: 'order_complaints',
        meta: {
          icon: 'md-clipboard',
          title: '订单投诉',
          access: ['super']
        },
        component: () =>
          import('@/view/order-mgr/order-complaints.vue')
      },
      {
        path: 'complaint_detail',
        name: 'complaint_detail',
        meta: {
          icon: 'md-clipboard',
          title: '投诉详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/order-mgr/complaint-detail.vue')
      },
      {
        path: 'order_pick_up_list',
        name: 'order_pick_up_list',
        meta: {
          icon: 'md-cart',
          title: '提货管理',
          access: ['super']
        },
        component: () =>
          import('@/view/order-mgr/pick-up-list')
      },
      {
        path: 'pick_up_detail',
        name: 'pick_up_detail',
        meta: {
          icon: 'md-cart',
          title: '提货详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/order-mgr/pick-up-list/pick-up-detail')
      },
      {
        path: 'order_settings',
        name: 'order_settings',
        meta: {
          icon: 'md-cog',
          title: '订单设置',
          access: ['super']
        },
        component: () =>
          import('@/view/order-mgr/order-settings.vue')
      }
    ]
  },
  {
    path: '/data_center',
    name: 'data_center',
    meta: {
      icon: 'ios-home',
      title: '数据中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'commodity_statistics',
        name: 'commodity_statistics',
        meta: {
          icon: 'ios-paper-outline',
          title: '商品统计',
          access: ['super']
        },
        component: () =>
          import('@/view/data-center/commodity-statistics.vue')
      },
      {
        path: 'merchant_statistics',
        name: 'merchant_statistics',
        meta: {
          icon: 'ios-paper',
          title: '商户统计',
          access: ['super']
        },
        component: () =>
          import('@/view/data-center/merchant-statistics.vue')
      },
      {
        path: 'order_statistics',
        name: 'order_statistics',
        meta: {
          icon: 'md-person',
          title: '订单统计',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/data-center/order-statistics.vue')
      },
      {
        path: 'user_statistics',
        name: 'user_statistics',
        meta: {
          icon: 'md-person',
          title: '用户统计',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/data-center/user-statistics.vue')
      },
      {
        path: 'information-export',
        name: 'information-export',
        meta: {
          icon: 'md-person',
          title: '信息统计导出',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/data-center/information-export.vue')
      }
    ]
  },
  {
    path: '/logistics_center',
    name: 'logistics_center',
    meta: {
      icon: 'md-medal',
      title: '物流中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'freight_template',
        name: 'freight_template',
        meta: {
          icon: 'md-cash',
          title: '运费模板',
          access: ['super']
        },
        component: () =>
          import('@/view/logistics-center/freight-template')
      },
      // {
      //   path: 'add_freight',
      //   name: 'add_freight',
      //   meta: {
      //     icon: 'md-cash',
      //     title: '新增模板',
      //     access: ['super']
      //   },
      //   component: () =>
      //       import ('@/view/logistics-center/add-freight')
      // },
      {
        path: 'update_freight',
        name: 'update_freight',
        meta: {
          icon: 'md-cash',
          title: '编辑模板',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/logistics-center/add-freight')
      },
      {
        path: 'parcel_center',
        name: 'parcel_center',
        meta: {
          icon: 'md-git-network',
          title: '包裹中心',
          access: ['super']
        },
        component: () =>
          import('@/view/logistics-center/parcel-center')
      },
      {
        path: 'parcel_detail',
        name: 'parcel_detail',
        meta: {
          icon: 'md-git-network',
          title: '包裹详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/logistics-center/parcel-detail')
      },
      {
        path: 'express_company',
        name: 'express_company',
        meta: {
          icon: 'ios-list-box',
          title: '快递公司',
          access: ['super']
        },
        component: () =>
          import('@/view/logistics-center/express-company')
      },
      {
        path: 'add_company',
        name: 'add_company',
        meta: {
          icon: 'md-cash',
          title: '新增快递公司',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/logistics-center/add-company')
      },
      {
        path: 'address_list',
        name: 'address_list',
        meta: {
          icon: 'md-navigate',
          title: '地址列表',
          access: ['super']
        },
        component: () =>
          import('@/view/logistics-center/address-list')
      },
      {
        path: 'add_address',
        name: 'add_address',
        meta: {
          icon: 'md-navigate',
          title: '新增地址',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/logistics-center/add-address')
      }
    ]
  },
  {
    path: '/system_center',
    name: 'system_center',
    meta: {
      icon: 'md-medal',
      title: '系统中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'global_settings',
        name: 'global_settings',
        meta: {
          icon: 'md-cash',
          title: '全局设置',
          access: ['super']
        },
        component: () =>
          import('@/view/system-center/global-settings')
      },
      {
        path: 'sensitive_words',
        name: 'sensitive_words',
        meta: {
          icon: 'ios-cog',
          title: '敏感词',
          access: ['super']
        },
        component: () =>
          import('@/view/system-center/sensitive-words')
      },
      {
        path: 'common_problem',
        name: 'common_problem',
        meta: {
          icon: 'md-list',
          title: '常见问题',
          access: ['super']
        },
        component: () =>
          import('@/view/system-center/common-problem')
      },
      {
        path: 'add_question',
        name: 'add_question',
        meta: {
          icon: 'md-cash',
          title: '添加问题',
          access: ['super']
        },
        component: () =>
          import('@/view/system-center/add-question')
      },
      {
        path: 'edit_question',
        name: 'edit_question',
        meta: {
          icon: 'md-cash',
          title: '编辑问题',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/system-center/add-question')
      },
      {
        path: 'chain_management',
        name: 'chain_management',
        meta: {
          icon: 'md-cash',
          title: '区块链管理',
          access: ['super']
        },
        component: () =>
          import('@/view/system-center/chain-management')
      },
      {
        path: 'management_pass',
        name: 'management_pass',
        meta: {
          icon: 'md-cash',
          title: '管理通证',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/system-center/management-pass')
      }
    ]
  },
  {
    path: '/store_center',
    name: 'store_center',
    meta: {
      icon: 'ios-home',
      title: '店铺中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'store_management',
        name: 'store_management',
        meta: {
          icon: 'md-options',
          title: '店铺管理',
          access: ['super']
        },
        component: () =>
          import('@/view/store-center/store-management')
      },
      {
        path: 'navigation_management',
        name: 'navigation_management',
        meta: {
          icon: 'ios-paper-plane',
          title: '导航管理',
          access: ['super']
        },
        component: () =>
          import('@/view/store-center/navigation-management')
      },
      {
        path: 'add_navigation',
        name: 'add_navigation',
        meta: {
          icon: 'md-cash',
          title: '新增店铺导航',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/store-center/add-navigation')
      },
      {
        path: 'navigation_detail',
        name: 'navigation_detail',
        meta: {
          icon: 'md-cash',
          title: '店铺导航详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/store-center/add-navigation')
      }
    ]
  },
  {
    path: '/marketing_mgr',
    name: 'marketing_mgr',
    meta: {
      icon: 'md-trending-up',
      title: '运营中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'advertising_management',
        name: 'advertising_management',
        meta: {
          icon: 'md-star',
          title: '广告管理',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/advertising-management.vue')
      },
      {
        path: 'add_banner',
        name: 'add_banner',
        meta: {
          icon: 'md-person',
          title: '新增广告',
          access: ['super'],
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-banner')
      },
      {
        path: 'update_banner',
        name: 'update_banner',
        meta: {
          icon: 'md-person',
          title: '编辑广告',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-banner')
      },
      {
        path: 'banner_detail',
        name: 'banner_detail',
        meta: {
          icon: 'md-person',
          title: '广告详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-banner')
      },
      {
        path: 'index_floor',
        name: 'index_floor',
        meta: {
          icon: 'ios-albums',
          title: '首页楼层',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/index-floor')
      },
      {
        path: 'ribbon_management',
        name: 'ribbon_management',
        meta: {
          icon: 'ios-build',
          title: '功能区管理',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/ribbon-management')
      },
      {
        path: 'add_ribbon',
        name: 'add_ribbon',
        meta: {
          icon: 'md-person',
          title: '新增功能区',
          access: ['super'],
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-ribbon')
      },
      {
        path: 'update_ribbon',
        name: 'update_ribbon',
        meta: {
          icon: 'md-person',
          title: '编辑功能区',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-ribbon')
      },
      {
        path: 'search_keyword',
        name: 'search_keyword',
        meta: {
          icon: 'md-book',
          title: '搜索关键字',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/search-keyword')
      },
      {
        path: 'consumption_reward',
        name: 'consumption_reward',
        meta: {
          icon: 'md-bowtie',
          title: '消费奖励',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/consumption-reward.vue')
      },
      {
        path: 'coupon_management',
        name: 'coupon_management',
        meta: {
          icon: 'md-list',
          title: '优惠券管理',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/coupon-management.vue')
      },
      {
        path: 'add_coupon',
        name: 'add_coupon',
        meta: {
          icon: 'md-list',
          title: '新增优惠券',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/add-coupon.vue')
      },
      {
        path: 'update_coupon',
        name: 'update_coupon',
        meta: {
          icon: 'md-list',
          title: '编辑优惠券',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-coupon.vue')
      },
      {
        path: 'coupon_detail',
        name: 'coupon_detail',
        meta: {
          icon: 'md-list',
          title: '优惠券详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-coupon.vue')
      },
      {
        path: 'group_purchase',
        name: 'group_purchase',
        meta: {
          icon: 'ios-bowtie',
          title: '团购活动',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/group-purchase.vue')
      },
      {
        path: 'integral_recurrence',
        name: 'integral_recurrence',
        meta: {
          icon: 'logo-buffer',
          title: '积分返现',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/integral-recurrence.vue')
      },
      {
        path: 'add_integral',
        name: 'add_integral',
        meta: {
          icon: 'md-list',
          title: '新增积分返现',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-integral.vue')
      },
      {
        path: 'update_integral',
        name: 'update_integral',
        meta: {
          icon: 'md-list',
          title: '编辑积分返现',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-integral.vue')
      },
      {
        path: 'integral_detail',
        name: 'integral_detail',
        meta: {
          icon: 'md-list',
          title: '积分返现详情',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/marketing-mgr/add-integral.vue')
      },
      {
        path: 'plat_integral_back',
        name: 'plat_integral_back',
        meta: {
          icon: 'logo-buffer',
          title: '积分返现',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/plat-integral-back.vue')
      },
      {
        path: 'newgift_pack',
        name: 'newgift_pack',
        meta: {
          icon: 'md-bookmark',
          title: '新人礼包',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/newgift-pack.vue')
      },
      {
        path: 'promotion_commission',
        name: 'promotion_commission',
        meta: {
          icon: 'logo-dropbox',
          title: '推广佣金',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/promotion-commission.vue')
      },
      {
        path: 'sales_promotion',
        name: 'sales_promotion',
        meta: {
          icon: 'ios-podium',
          title: '促销活动',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/sales-promotion.vue')
      },
      {
        path: 'add_promotion',
        name: 'add_promotion',
        meta: {
          icon: 'ios-podium',
          title: '新增促销活动',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/add-promotion.vue')
      },
      {
        path: 'update_promotion',
        name: 'update_promotion',
        meta: {
          icon: 'ios-podium',
          title: '编辑促销活动',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/add-promotion.vue')
      },
      {
        path: 'promotion_detail',
        name: 'promotion_detail',
        meta: {
          icon: 'ios-podium',
          title: '促销活动详情',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/add-promotion.vue')
      },
      {
        path: 'second_kil',
        name: 'second_kil',
        meta: {
          icon: 'logo-playstation',
          title: '秒杀活动',
          access: ['super']
        },
        component: () =>
          import('@/view/marketing-mgr/second-kil.vue')
      },
      // 购赠活动
      {
        path: 'purchase_gift/event_list',
        name: 'purchase_gift_event_list',
        meta: {
          icon: 'md-ribbon',
          title: '购赠活动'
        },
        component: () =>
          import('@/view/marketing-mgr/purchase-gift/event-list.vue')
      },
      {
        path: 'purchase_gift/add_event',
        name: 'purchase_gift_add_event',
        meta: {
          icon: 'md-ribbon',
          title: '购赠活动'
        },
        component: () =>
          import('@/view/marketing-mgr/purchase-gift/add-event.vue')
      },
      {
        path: 'purchase_gift/record_list',
        name: 'purchase_gift_record_list',
        meta: {
          icon: 'md-ribbon',
          title: '购赠活动记录'
        },
        component: () =>
          import('@/view/marketing-mgr/purchase-gift/record-list.vue')
      },
      // 集齐活动
      {
        path: 'collect/event_list',
        name: 'collect_event_list',
        meta: {
          icon: 'md-star',
          title: '集齐活动'
        },
        component: () =>
          import('@/view/marketing-mgr/collect/event-list.vue')
      },
      {
        path: 'collect/add_event',
        name: 'collect_add_event',
        meta: {
          icon: 'md-star',
          title: '集齐活动'
        },
        component: () =>
          import('@/view/marketing-mgr/collect/add-event.vue')
      },
      {
        path: 'collect/record_list',
        name: 'collect_record_list',
        meta: {
          icon: 'md-star',
          title: '集齐活动记录'
        },
        component: () =>
          import('@/view/marketing-mgr/collect/record-list.vue')
      },
      {
        path: 'airdrop_activity/index',
        name: 'airdrop_activity',
        meta: {
          icon: 'md-person',
          title: '空投活动',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
            import ('@/view/marketing-mgr/airdrop_activity/index.vue')
      },
      {
        path: 'airdrop_activity/add_airdrop',
        name: 'airdrop_add_airdrop',
        meta: {
          icon: 'md-person',
          title: '新增空投活动',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
            import ('@/view/marketing-mgr/airdrop_activity/add_airdrop.vue')
      },
      {
        path: 'airdrop_activity/record_list',
        name: 'airdrop_activity_record_list',
        meta: {
          icon: 'md-ribbon',
          title: '空投记录'
        },
        component: () =>
          import('@/view/marketing-mgr/airdrop_activity/record-list.vue')
      },
      {
        path: 'coupon-airdrop/index',
        name: 'coupon-airdrop',
        meta: {
          icon: 'md-person',
          title: '优惠劵空投',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
            import ('@/view/marketing-mgr/coupon-airdrop/index.vue')
      },
      {
        path: 'coupon-airdrop/add_airdrop',
        name: 'coupon_add_airdrop',
        meta: {
          icon: 'md-person',
          title: '新增优惠券空投',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
            import ('@/view/marketing-mgr/coupon-airdrop/add_airdrop.vue')
      },
      {
        path: 'coupon-airdrop/record_list',
        name: 'coupon-airdrop_record_list',
        meta: {
          icon: 'md-ribbon',
          title: '空投记录'
        },
        component: () =>
          import('@/view/marketing-mgr/coupon-airdrop/record-list.vue')
      },
      {
        path: 'shop-recommend/index',
        name: 'shop-recommend_index',
        meta: {
          icon: 'md-ribbon',
          title: '店铺推荐'
        },
        component: () =>
          import('@/view/marketing-mgr/shop-recommend/index.vue')
      },
    ]
  },
  {
    path: '/authority_center',
    name: 'authority_center',
    meta: {
      icon: 'md-construct',
      title: '权限中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'account_management',
        name: 'account_management',
        meta: {
          icon: 'md-settings',
          title: '账号管理',
          access: ['super']
        },
        component: () =>
          import('@/view/authority-center/account-management.vue')
      },
      {
        path: 'function_management',
        name: 'function_management',
        meta: {
          icon: 'md-build',
          title: '功能管理',
          access: ['super']
        },
        component: () =>
          import('@/view/authority-center/function-management.vue')
      },
      {
        path: 'role_management',
        name: 'role_management',
        meta: {
          icon: 'md-body',
          title: '角色管理',
          access: ['super']
        },
        component: () =>
          import('@/view/authority-center/role-management.vue')
      },
      {
        path: 'add_role',
        name: 'add_role',
        meta: {
          icon: 'md-body',
          title: '新增角色',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/authority-center/add-role.vue')
      },
      {
        path: 'edit_role',
        name: 'edit_role',
        meta: {
          icon: 'md-body',
          title: '编辑角色',
          hideInMenu: true,
          notCache: true
        },
        component: () =>
          import('@/view/authority-center/add-role.vue')
      }
      // {
      //     path: 'admin_list',
      //     name: 'admin_list',
      //     meta: {
      //         icon: 'md-contacts',
      //         title: '后台管理员',
      //         access: ['super']
      //     },
      //     component: () =>
      //         import ('@/view/authority-center/admin-list.vue')
      // },
      // {
      //     path: 'system_msg',
      //     name: 'system_msg',
      //     meta: {
      //         icon: 'md-chatboxes',
      //         title: '系统消息',
      //         access: ['super']
      //     },
      //     component: () =>
      //         import ('@/view/authority-center/system-msg.vue')
      // },
      // {
      //     path: 'opt_log',
      //     name: 'opt_log',
      //     meta: {
      //         icon: 'md-bookmark',
      //         title: '操作日志',
      //         access: ['super']
      //     },
      //     component: () =>
      //         import ('@/view/authority-center/opt-log.vue')
      // }
    ]
  },
  {
    path: '/sale',
    name: 'sale',
    meta: {
      icon: 'ios-contacts',
      title: '客服中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'after_sales',
        name: 'after_sales',
        meta: {
          icon: 'ios-contacts',
          title: '售后',
          access: ['super']
        },
        component: () =>
          import('@/view/sale/after-sales.vue')
      }
      // {
      //   path: 'pre_sale',
      //   name: 'pre_sale',
      //   meta: {
      //     icon: 'md-settings',
      //     title: '售前',
      //     access: ['super']
      //   },
      //   component: () =>
      //                   import ('@/view/sale/pre-sale.vue')
      // }
    ]
  },
  {
    path: '/helpCenter',
    name: 'helpCenter',
    meta: {
      icon: 'ios-contacts',
      title: '帮助中心',
      access: ['super']
    },
    component: Main,
    children: [{
        path: 'help_page',
        name: 'help_page',
        meta: {
          icon: 'ios-contacts',
          title: '帮助',
          access: ['super']
        },
        component: () =>
          import('@/view/help-center/help-page.vue')
      },
      {
        path: 'add_help',
        name: 'add_help',
        meta: {
          icon: 'ios-contacts',
          title: '新建帮助',
          access: ['super']
        },
        component: () =>
          import('@/view/help-center/add-help.vue')
      },
      {
        path: 'edit_help',
        name: 'edit_help',
        meta: {
          icon: 'ios-contacts',
          title: '编辑帮助',
          access: ['super']
        },
        component: () =>
          import('@/view/help-center/add-help.vue')
      },
    ]
  },
  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: () =>
      import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    meta: {
      hideInMenu: true
    },
    component: () =>
      import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: () =>
      import('@/view/error-page/404.vue')
  }
]
