123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- import Vue from 'vue'
- import Router from 'vue-router'
- Vue.use(Router)
- /* Layout */
- import Layout from '../views/layout/Layout'
- /**
- * hidden: true if `hidden:true` will not show in the sidebar(default is false)
- * alwaysShow: true if set true, will always show the root menu, whatever its child routes length
- * if not set alwaysShow, only more than one route under the children
- * it will becomes nested mode, otherwise not show the root menu
- * redirect: noredirect if `redirect:noredirect` will no redirct in the breadcrumb
- * name:'router-name' the name is used by <keep-alive> (must set!!!)
- * meta : {
- title: 'title' the name show in submenu and breadcrumb (recommend set)
- icon: 'svg-name' the icon show in the sidebar,
- }
- **/
- export const constantRouterMap = [
- {path: '/login', component: () => import('@/views/login/index'), hidden: true},
- {path: '/404', component: () => import('@/views/404'), hidden: true},
- {
- path: '',
- component: Layout,
- redirect: '/home',
- meta: {title: '首页', icon: 'home'},
- children: [{
- path: 'home',
- name: 'home',
- component: () => import('@/views/home/index'),
- meta: {title: '首页', icon: 'home'}
- },]
- }
- ]
- export const asyncRouterMap = [
- {
- path: '/channel',
- component: Layout,
- redirect: '/channel/info',
- name: 'channel',
- meta: {title: '渠道管理', icon: 'cms-subject'},
- children: [{
- path: 'info',
- name: 'info',
- component: () => import('@/views/channel/info/index'),
- meta: {title: '基础信息', icon: 'BasicsInfo'},
- },
- {
- path: 'useCondition',
- name: 'useCondition',
- component: () => import('@/views/channel/useCondition/index'),
- meta: {title: '使用情况', icon: 'useCondition'}
- },
- {
- path: 'upCheck',
- name: 'upCheck',
- component: () => import('@/views/channel/upCheck/index'),
- meta: {title: '上账情况', icon: 'settleAccounts'}
- },
- ]
- },
- {
- path: '/distribution',
- component: Layout,
- redirect: '/distribution/distributionSet',
- name: 'distribution',
- meta: {title: '分销管理', icon: 'total-yesterday'},
- children: [{
- path: 'distributionSet',
- name: 'distributionSet',
- component: () => import('@/views/distribution/distributionSet/index'),
- meta: {title: '分销设置', icon: 'setting'}
- },
- {
- path: 'userList',
- name: 'userList',
- component: () => import('@/views/distribution/userList/index'),
- meta: {title: '用户列表', icon: 'user'}
- },
- {
- path: 'peopleManage',
- name: 'peopleManage',
- component: () => import('@/views/distribution/peopleManage/index'),
- meta: {title: '分销员管理', icon: 'peopleChannel'}
- },
- {
- path: 'junior',
- name: 'junior',
- component: () => import('@/views/distribution/peopleManage/junior'),
- meta: {title: '下级查看', icon: 'peopleChannel'},
- hidden: true
- },
- {
- path: 'setCommission',
- name: 'setCommission',
- component: () => import('@/views/distribution/peopleManage/setCommission'),
- meta: {title: '分销佣金设置', icon: 'peopleChannel'},
- hidden: true
- },
- {
- path: 'settingsPrice',
- name: 'settingsPrice',
- component: () => import('@/views/distribution/peopleManage/settingsPrice'),
- meta: {title: '代理价设置', icon: 'peopleChannel'},
- hidden: true
- },
- {
- path: 'firstSetPrice',
- name: 'firstSetPrice',
- component: () => import('@/views/distribution/peopleManage/firstSetPrice'),
- meta: {title: '代理价设置', icon: 'peopleChannel'},
- hidden: true
- },
- {
- path: 'statistics',
- name: 'statistics',
- component: () => import('@/views/distribution/statistics/index'),
- meta: {title: '业绩统计', icon: 'performance'}
- },
- {
- path: 'records',
- name: 'records',
- component: () => import('@/views/distribution/records/index'),
- meta: {title: '分销记录', icon: 'example'}
- },
- {
- path: 'finance',
- name: 'finance',
- component: () => import('@/views/distribution/finance/index'),
- meta: {title: '结算记录', icon: 'order-return-reason'}
- },
- {
- path: 'changePwd',
- name: 'changePwd',
- component: () => import('@/views/distribution/changePwd/index'),
- meta: {title: '修改密码'},
- hidden: true
- }
- ]
- },
- {
- path:'/ums',
- component: Layout,
- redirect: '/ums/admin',
- name: 'ums',
- meta: {title: '权限管理', icon: 'ums'},
- children: [
- {
- path: 'admin',
- name: 'admin',
- component: () => import('@/views/ums/admin/index'),
- meta: {title: '平台成员', icon: 'ums-admin'}
- },
- {
- path: 'role',
- name: 'role',
- component: () => import('@/views/ums/role/index'),
- meta: {title: '角色列表', icon: 'ums-role'}
- },
- {
- path: 'allocMenu',
- name: 'allocMenu',
- component: () => import('@/views/ums/role/allocMenu'),
- meta: {title: '分配菜单'},
- hidden: true
- },
- {
- path: 'allocResource',
- name: 'allocResource',
- component: () => import('@/views/ums/role/allocResource'),
- meta: {title: '分配资源'},
- hidden: true
- },
- {
- path: 'menu',
- name: 'menu',
- component: () => import('@/views/ums/menu/index'),
- meta: {title: '菜单列表', icon: 'ums-menu'}
- },
- {
- path: 'addMenu',
- name: 'addMenu',
- component: () => import('@/views/ums/menu/add'),
- meta: {title: '添加菜单'},
- hidden: true
- },
- {
- path: 'updateMenu',
- name: 'updateMenu',
- component: () => import('@/views/ums/menu/update'),
- meta: {title: '修改菜单'},
- hidden: true
- },
- {
- path: 'resource',
- name: 'resource',
- component: () => import('@/views/ums/resource/index'),
- meta: {title: '资源列表', icon: 'ums-resource'}
- },
- {
- path: 'resourceCategory',
- name: 'resourceCategory',
- component: () => import('@/views/ums/resource/categoryList'),
- meta: {title: '资源分类'},
- hidden: true
- }
- ]
- },
- {path: '*', redirect: '/404', hidden: true}
- ]
- export default new Router({
- // mode: 'history', //后端支持可开
- scrollBehavior: () => ({y: 0}),
- routes: constantRouterMap
- })
|