|
@@ -0,0 +1,497 @@
|
|
|
+import Vue from 'vue'
|
|
|
+import Router from 'vue-router'
|
|
|
+
|
|
|
+Vue.use(Router)
|
|
|
+
|
|
|
+/* Layout */
|
|
|
+import Layout from '@/layout'
|
|
|
+
|
|
|
+/**
|
|
|
+ * 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' },
|
|
|
+ alwaysShow: true,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/home',
|
|
|
+ name: '/home',
|
|
|
+ component: () => import('@/views/home/index.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: '/shopManage/index',
|
|
|
+ component: Layout,
|
|
|
+ meta: { title: '商铺管理', icon: 'el-icon-s-shop' },
|
|
|
+ alwaysShow: true,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/shopManage/index',
|
|
|
+ name: '/shopManage/index',
|
|
|
+ component: () => import('@/views/shopManage/index.vue'),
|
|
|
+ meta: { title: '商铺列表', icon: '' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/shopManage/shopDetail',
|
|
|
+ name: '/shopManage/shopDetail',
|
|
|
+ hidden: true ,
|
|
|
+ component: () => import('@/views/shopManage/shopDetail.vue'),
|
|
|
+ meta: { title: '商铺详情', icon: '',activeMenu:'/shopManage/index' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/shopManage/shopAdd',
|
|
|
+ name: '/shopManage/shopAdd',
|
|
|
+ component: () => import('@/views/shopManage/shopAdd.vue'),
|
|
|
+ meta: { title: '商铺添加'},
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 0,
|
|
|
+ path: '/goodsManage/index',
|
|
|
+ component: Layout,
|
|
|
+ meta: { title: '商品管理', icon: 'el-icon-s-goods' },
|
|
|
+ alwaysShow: true,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/goodsManage/index',
|
|
|
+ name: '/goodsManage/index',
|
|
|
+ component: () => import('@/views/goodsManage/index.vue'),
|
|
|
+ meta: { title: '商品列表', icon: '' },
|
|
|
+ },
|
|
|
+
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 0,
|
|
|
+ path: '/orderManage/orderList',
|
|
|
+ component: Layout,
|
|
|
+ meta: { title: '订单管理', icon: 'el-icon-s-goods' },
|
|
|
+ alwaysShow: true,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/orderManage/orderList',
|
|
|
+ name: '/orderManage/orderList',
|
|
|
+ component: () => import('@/views/orderManage/orderList.vue'),
|
|
|
+ meta: { title: '订单列表', icon: '' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/orderManage/detail',
|
|
|
+ name: '/orderManage/detail',
|
|
|
+ component: () => import('@/views/orderManage/detail.vue'),
|
|
|
+ meta: { title: '订单详情', icon: '' },
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 0,
|
|
|
+ path: '/afterSales/afterSalesList',
|
|
|
+ component: Layout,
|
|
|
+ meta: { title: '售后管理', icon: 'el-icon-s-goods' },
|
|
|
+ alwaysShow: true,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/afterSales/afterSalesList',
|
|
|
+ name: '/afterSales/afterSalesList',
|
|
|
+ component: () => import('@/views/afterSales/afterSalesList.vue'),
|
|
|
+ meta: { title: '售后列表', icon: '' },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ path: '/afterSales/detail',
|
|
|
+ name: '/afterSales/detail',
|
|
|
+ component: () => import('@/views/afterSales/detail.vue'),
|
|
|
+ meta: { title: '售后详情', icon: '' },
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // id: 3,
|
|
|
+ // path: '/announcementManage',
|
|
|
+ // component: Layout,
|
|
|
+ // meta: { title: '公告管理', icon: 'icon-xinwen' },
|
|
|
+ // alwaysShow: true,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 4,
|
|
|
+ // path: '/announcementManage',
|
|
|
+ // name: '/announcementManage',
|
|
|
+ // component: () => import('@/views/announcementManage/index.vue'),
|
|
|
+ // meta: { title: '公告列表', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 5,
|
|
|
+ // path: '/announcementManage/addAnnouncement',
|
|
|
+ // name: '/announcementManage/addAnnouncement',
|
|
|
+ // component: () => import('@/views/announcementManage/addAnnouncement.vue'),
|
|
|
+ // meta: { title: '发布公告', icon: '', activeMenu: '/announcementManage' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 6,
|
|
|
+ // path: '/emailManage',
|
|
|
+ // component: Layout,
|
|
|
+ // meta: { title: '邮件管理', icon: 'icon-duanxinyingxiao' },
|
|
|
+ // alwaysShow: true,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 7,
|
|
|
+ // path: '/emailManage',
|
|
|
+ // name: '/emailManage',
|
|
|
+ // component: () => import('@/views/emailManage/index.vue'),
|
|
|
+ // meta: { title: '邮件列表', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 8,
|
|
|
+ // path: '/emailManage/sendEmail',
|
|
|
+ // name: '/emailManage/sendEmail',
|
|
|
+ // component: () => import('@/views/emailManage/sendEmail.vue'),
|
|
|
+ // meta: { title: '发送邮件', icon: '', activeMenu: '/emailManage' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 9,
|
|
|
+ // path: '/articleManage',
|
|
|
+ // component: Layout,
|
|
|
+ // meta: { title: '文章管理', icon: 'icon-bianjiwenzhang_huaban' },
|
|
|
+ // alwaysShow: true,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 10,
|
|
|
+ // path: '/articleManage',
|
|
|
+ // name: '/articleManage',
|
|
|
+ // component: () => import('@/views/articleManage/index.vue'),
|
|
|
+ // meta: { title: '游戏攻略', icon: '' },
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 11,
|
|
|
+ // path: '/memberManage',
|
|
|
+ // component: Layout,
|
|
|
+ // meta: { title: '会员管理', icon: 'icon-guanliyuan_jiaoseguanli' },
|
|
|
+ // alwaysShow: true,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 12,
|
|
|
+ // path: '/memberManage/memberList',
|
|
|
+ // name: '/memberManage/memberList',
|
|
|
+ // component: () => import('@/views/memberManage/memberList.vue'),
|
|
|
+ // meta: { title: '会员列表', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 13,
|
|
|
+ // path: '/memberManage/memberDetail',
|
|
|
+ // name: '/memberManage/memberDetail',
|
|
|
+ // component: () => import('@/views/memberManage/memberDetail.vue'),
|
|
|
+ // meta: { title: '会员详情', icon: '', activeMenu: '/memberManage/memberList' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 14,
|
|
|
+ // path: '/memberManage/diamondIncome',
|
|
|
+ // name: '/memberManage/diamondIncome',
|
|
|
+ // component: () => import('@/views/memberManage/diamondIncome.vue'),
|
|
|
+ // meta: { title: '黑钻收支明细', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 15,
|
|
|
+ // path: '/memberManage/rebateList',
|
|
|
+ // name: '/memberManage/rebateList',
|
|
|
+ // component: () => import('@/views/memberManage/rebateList.vue'),
|
|
|
+ // meta: { title: '返佣查询', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 16,
|
|
|
+ // path: '/memberManage/rebateDetail',
|
|
|
+ // name: '/memberManage/rebateDetail',
|
|
|
+ // component: () => import('@/views/memberManage/rebateDetail.vue'),
|
|
|
+ // meta: { title: '返佣明细', icon: '', activeMenu: '/memberManage/rebateList' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 17,
|
|
|
+ // path: '/memberManage/earningsDetail',
|
|
|
+ // name: '/memberManage/earningsDetail',
|
|
|
+ // component: () => import('@/views/memberManage/earningsDetail.vue'),
|
|
|
+ // meta: { title: '产生收益明细', icon: '', activeMenu: '/memberManage/rebateList' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 41,
|
|
|
+ // path: '/memberManage/history',
|
|
|
+ // name: '/memberManage/history',
|
|
|
+ // component: () => import('@/views/memberManage/history.vue'),
|
|
|
+ // meta: { title: '礼包领取记录', icon: '', },
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 18,
|
|
|
+ // path: '/gameManage',
|
|
|
+ // component: Layout,
|
|
|
+ // meta: { title: '游戏管理', icon: 'icon-youxi' },
|
|
|
+ // alwaysShow: true,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 19,
|
|
|
+ // path: '/gameManage/kittyLevel',
|
|
|
+ // name: '/gameManage/kittyLevel',
|
|
|
+ // component: () => import('@/views/gameManage/kittyLevel.vue'),
|
|
|
+ // meta: { title: '猫咪品级管理', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 20,
|
|
|
+ // path: '/gameManage/kittyMarket',
|
|
|
+ // name: '/gameManage/kittyMarket',
|
|
|
+ // component: () => import('@/views/gameManage/kittyMarket.vue'),
|
|
|
+ // meta: { title: '猫市列表', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 21,
|
|
|
+ // path: '/gameManage/cattery',
|
|
|
+ // name: '/gameManage/cattery',
|
|
|
+ // component: () => import('@/views/gameManage/cattery.vue'),
|
|
|
+ // meta: { title: '猫窝管理', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 22,
|
|
|
+ // path: '/gameManage/propManage',
|
|
|
+ // name: '/gameManage/propManage',
|
|
|
+ // component: () => import('@/views/gameManage/propManage.vue'),
|
|
|
+ // meta: { title: '道具管理', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 23,
|
|
|
+ // path: '/gameManage/goodsManage',
|
|
|
+ // name: '/gameManage/goodsManage',
|
|
|
+ // component: () => import('@/views/gameManage/goodsManage.vue'),
|
|
|
+ // meta: { title: '物品管理', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 24,
|
|
|
+ // path: '/gameManage/dailyGift',
|
|
|
+ // name: '/gameManage/dailyGift',
|
|
|
+ // component: () => import('@/views/gameManage/dailyGift.vue'),
|
|
|
+ // meta: { title: '每日礼包', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 25,
|
|
|
+ // path: '/gameManage/gameSetting',
|
|
|
+ // name: '/gameManage/gameSetting',
|
|
|
+ // component: () => import('@/views/gameManage/gameSetting.vue'),
|
|
|
+ // meta: { title: '游戏设置', icon: '' },
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 26,
|
|
|
+ // path: '/stateManage',
|
|
|
+ // component: Layout,
|
|
|
+ // meta: { title: '报表统计', icon: 'icon-baobiao' },
|
|
|
+ // alwaysShow: true,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 27,
|
|
|
+ // path: '/stateManage/businessReport',
|
|
|
+ // name: '/stateManage/businessReport',
|
|
|
+ // component: () => import('@/views/stateManage/businessReport.vue'),
|
|
|
+ // meta: { title: '业务报表', icon: '' },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 28,
|
|
|
+ // path: '/stateManage/agentList',
|
|
|
+ // name: '/stateManage/agentList',
|
|
|
+ // component: () => import('@/views/stateManage/agentList.vue'),
|
|
|
+ // meta: { title: '业务报表(代理)', icon: '', activeMenu: '/stateManage/businessReport' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 29,
|
|
|
+ // path: '/stateManage/groupLeader',
|
|
|
+ // name: '/stateManage/groupLeader',
|
|
|
+ // component: () => import('@/views/stateManage/groupLeader.vue'),
|
|
|
+ // meta: { title: '业务报表(组长)', icon: '', activeMenu: '/stateManage/businessReport' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 30,
|
|
|
+ // path: '/stateManage/groupMembers',
|
|
|
+ // name: '/stateManage/groupMembers',
|
|
|
+ // component: () => import('@/views/stateManage/groupMembers.vue'),
|
|
|
+ // meta: { title: '业务报表(组员)', icon: '', activeMenu: '/stateManage/businessReport' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 31,
|
|
|
+ // path: '/stateManage/memberList',
|
|
|
+ // name: '/stateManage/memberList',
|
|
|
+ // component: () => import('@/views/stateManage/memberList.vue'),
|
|
|
+ // meta: { title: '查看明细', icon: '', activeMenu: '/stateManage/businessReport' },
|
|
|
+ // hidden: true
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 32,
|
|
|
+ // path: '/stateManage/memberStatistics',
|
|
|
+ // name: '/stateManage/memberStatistics',
|
|
|
+ // component: () => import('@/views/stateManage/memberStatistics.vue'),
|
|
|
+ // meta: { title: '会员每日统计', icon: '', },
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: 33,
|
|
|
+ // path: '/financeManage',
|
|
|
+ // component: Layout,
|
|
|
+ // meta: { title: '财务管理', icon: 'icon-caidancaiwu' },
|
|
|
+ // alwaysShow: true,
|
|
|
+ // children: [
|
|
|
+ // {
|
|
|
+ // id: 34,
|
|
|
+ // path: '/financeManage/withdrawApply',
|
|
|
+ // name: '/financeManage/withdrawApply',
|
|
|
+ // component: () => import('@/views/financeManage/withdrawApply.vue'),
|
|
|
+ // meta: { title: '提现申请', icon: '' },
|
|
|
+ // },
|
|
|
+ // // {
|
|
|
+ // // id: 35,
|
|
|
+ // // path: '/financeManage/serviceCharge',
|
|
|
+ // // name: '/financeManage/serviceCharge',
|
|
|
+ // // component: () => import('@/views/financeManage/serviceCharge.vue'),
|
|
|
+ // // meta: { title: '提现手续费设置', icon: '' },
|
|
|
+ // // },
|
|
|
+ // {
|
|
|
+ // id: 40,
|
|
|
+ // path: '/financeManage/userRecharge',
|
|
|
+ // name: '/financeManage/userRecharge',
|
|
|
+ // component: () => import('@/views/financeManage/userRecharge.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
|