优化代码

This commit is contained in:
wangsongsole 2022-08-18 11:01:16 +08:00
parent a583b23e03
commit 57f46ad4ea
2 changed files with 4 additions and 81 deletions

View File

@ -6,7 +6,7 @@ import Bus from '@/assets/eventBus.js'
import Subnav from '@/components/subnav/main'
import { Avatar, Pop, Sweetalert, Dialog, Icon, Notify } from 'zent'
import ModifySelfpwd from './ModifySelfpwd'
import { router, navRoute, noShowSubMenu } from '@/router/index'
import { router, noShowSubMenu } from '@/router/index'
import {
getUserinfo,
@ -26,7 +26,7 @@ export default class App extends Component {
isShowSub: true,
pathname: '',
userInfo: {},
navlist: navRoute
navlist: []
}
//打开菜单移入遮罩
openMouseMask() {
@ -98,7 +98,6 @@ export default class App extends Component {
this.setState({ visible })
}
componentWillMount(e) {
console.log(1)
let activeMenuList = JSON.parse(sessionStorage.getItem('activeMenu'))
this.setState({ navlist: activeMenuList })
const pathname = window.location.href.lastIndexOf('/')

View File

@ -46,6 +46,7 @@ import DistriButorEdit from '@/pages/distributor/add/add'
import MyTempMouldAdd from '@/pages/exchangepage/template/main.js'
import MyExChangeTemplate from '@/pages/exchangepage/mytemplate/main.js'
import CopyCode from '@/pages/exchangecode/copyCode/index'
/* 基础路由 */
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 = [
'/home/extension',
@ -336,4 +260,4 @@ const noShowSubMenu = [
'/home/edittemplate'
]
export { router, navRoute, noShowSubMenu }
export { router, noShowSubMenu }