优化代码
This commit is contained in:
parent
a583b23e03
commit
57f46ad4ea
|
@ -6,7 +6,7 @@ import Bus from '@/assets/eventBus.js'
|
||||||
import Subnav from '@/components/subnav/main'
|
import Subnav from '@/components/subnav/main'
|
||||||
import { Avatar, Pop, Sweetalert, Dialog, Icon, Notify } from 'zent'
|
import { Avatar, Pop, Sweetalert, Dialog, Icon, Notify } from 'zent'
|
||||||
import ModifySelfpwd from './ModifySelfpwd'
|
import ModifySelfpwd from './ModifySelfpwd'
|
||||||
import { router, navRoute, noShowSubMenu } from '@/router/index'
|
import { router, noShowSubMenu } from '@/router/index'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getUserinfo,
|
getUserinfo,
|
||||||
|
@ -26,7 +26,7 @@ export default class App extends Component {
|
||||||
isShowSub: true,
|
isShowSub: true,
|
||||||
pathname: '',
|
pathname: '',
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
navlist: navRoute
|
navlist: []
|
||||||
}
|
}
|
||||||
//打开菜单移入遮罩
|
//打开菜单移入遮罩
|
||||||
openMouseMask() {
|
openMouseMask() {
|
||||||
|
@ -98,7 +98,6 @@ export default class App extends Component {
|
||||||
this.setState({ visible })
|
this.setState({ visible })
|
||||||
}
|
}
|
||||||
componentWillMount(e) {
|
componentWillMount(e) {
|
||||||
console.log(1)
|
|
||||||
let activeMenuList = JSON.parse(sessionStorage.getItem('activeMenu'))
|
let activeMenuList = JSON.parse(sessionStorage.getItem('activeMenu'))
|
||||||
this.setState({ navlist: activeMenuList })
|
this.setState({ navlist: activeMenuList })
|
||||||
const pathname = window.location.href.lastIndexOf('/')
|
const pathname = window.location.href.lastIndexOf('/')
|
||||||
|
|
|
@ -46,6 +46,7 @@ import DistriButorEdit from '@/pages/distributor/add/add'
|
||||||
import MyTempMouldAdd from '@/pages/exchangepage/template/main.js'
|
import MyTempMouldAdd from '@/pages/exchangepage/template/main.js'
|
||||||
import MyExChangeTemplate from '@/pages/exchangepage/mytemplate/main.js'
|
import MyExChangeTemplate from '@/pages/exchangepage/mytemplate/main.js'
|
||||||
import CopyCode from '@/pages/exchangecode/copyCode/index'
|
import CopyCode from '@/pages/exchangecode/copyCode/index'
|
||||||
|
|
||||||
/* 基础路由 */
|
/* 基础路由 */
|
||||||
const router = [
|
const router = [
|
||||||
{
|
{
|
||||||
|
@ -250,83 +251,6 @@ const router = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
/* 导航现实路由 */
|
|
||||||
const navRoute = [
|
|
||||||
{
|
|
||||||
name: '系统管理',
|
|
||||||
childmenu: [
|
|
||||||
{
|
|
||||||
group: '账号管理',
|
|
||||||
items: [
|
|
||||||
{ path: '/home/system/account-list', name: '账号管理' },
|
|
||||||
{ path: '/home/system/role-list', name: '角色管理' },
|
|
||||||
{ path: '/home/system/station', name: '岗位管理' },
|
|
||||||
{ path: '/home/system/menu', name: '菜单管理' },
|
|
||||||
{ path: '/home/system/customize', name: '定制化模板' },
|
|
||||||
{ path: '/home/system/systemModel', name: '系统模板' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
path: '/system'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '分销商管理',
|
|
||||||
childmenu: [
|
|
||||||
{
|
|
||||||
group: '分销商管理',
|
|
||||||
items: [{ path: '/home/distributor-list', name: '分销商管理' }]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
path: '/home/distributor-list'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '营销计划管理',
|
|
||||||
childmenu: [
|
|
||||||
{
|
|
||||||
group: '营销计划管理',
|
|
||||||
items: [
|
|
||||||
{ path: '/home/plan-list', name: '营销计划管理' },
|
|
||||||
{ path: '/home/plan-keyList', name: 'KEY列表管理' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
path: '/home/plan-list'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '兑换码管理',
|
|
||||||
childmenu: [
|
|
||||||
{
|
|
||||||
group: '兑换码列表',
|
|
||||||
items: [{ path: '/home/exchangecode-list', name: '兑换码列表' }]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
path: '/home/exchangecode-list'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '落地页管理',
|
|
||||||
childmenu: [
|
|
||||||
{
|
|
||||||
group: '落地页列表',
|
|
||||||
items: [
|
|
||||||
{ path: '/home/exchangepage', name: '落地页列表' },
|
|
||||||
{ path: '/home/myexchangetemplate', name: '我的模板' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
path: '/home/exchangepage'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '订单管理',
|
|
||||||
childmenu: [
|
|
||||||
{
|
|
||||||
group: '订单管理',
|
|
||||||
items: [{ path: '/home/order-list', name: '订单列表' }]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
path: '/home/order-list'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
/* 不显示路由 */
|
/* 不显示路由 */
|
||||||
const noShowSubMenu = [
|
const noShowSubMenu = [
|
||||||
'/home/extension',
|
'/home/extension',
|
||||||
|
@ -336,4 +260,4 @@ const noShowSubMenu = [
|
||||||
'/home/edittemplate'
|
'/home/edittemplate'
|
||||||
]
|
]
|
||||||
|
|
||||||
export { router, navRoute, noShowSubMenu }
|
export { router, noShowSubMenu }
|
||||||
|
|
Loading…
Reference in New Issue