优化营销系统菜单导航栏显示
This commit is contained in:
parent
efc427d1e8
commit
6427ff6d0c
|
@ -74,6 +74,7 @@ export default class topNav extends React.Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
|
console.log(77, this.state.menulinklist);
|
||||||
let history0= window.history.length<=1;
|
let history0= window.history.length<=1;
|
||||||
let routeflag=sessionStorage.getItem('showflag')
|
let routeflag=sessionStorage.getItem('showflag')
|
||||||
let breaknav=JSON.parse(sessionStorage.getItem('breaknav'))
|
let breaknav=JSON.parse(sessionStorage.getItem('breaknav'))
|
||||||
|
@ -84,7 +85,7 @@ export default class topNav extends React.Component{
|
||||||
let sedcbreakflag=pathnamestr.includes('plan-create');
|
let sedcbreakflag=pathnamestr.includes('plan-create');
|
||||||
let planbreakflag = pathnamestr.includes('mytempMould')
|
let planbreakflag = pathnamestr.includes('mytempMould')
|
||||||
let editbreakflag = pathnamestr.includes('edittemplate')
|
let editbreakflag = pathnamestr.includes('edittemplate')
|
||||||
let backshow=pathnamestr.includes('account-add')||pathnamestr.includes('role-add')||pathnamestr.includes('subaccount-add')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('exchange-addcommodity');
|
let backshow=pathnamestr.includes('account-add')||pathnamestr.includes('role-add')||pathnamestr.includes('distributor-add')||pathnamestr.includes('subaccount-add')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('exchange-addcommodity');
|
||||||
let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit')||pathnamestr.includes('key-detail')||pathnamestr.includes('product-edit')||pathnamestr.includes('plan-edit');
|
let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit')||pathnamestr.includes('key-detail')||pathnamestr.includes('product-edit')||pathnamestr.includes('plan-edit');
|
||||||
if(breakchange){
|
if(breakchange){
|
||||||
breaknav=JSON.parse(sessionStorage.getItem('breakchangenav'))
|
breaknav=JSON.parse(sessionStorage.getItem('breakchangenav'))
|
||||||
|
@ -131,7 +132,7 @@ export default class topNav extends React.Component{
|
||||||
<div className="linkmenu-row" >
|
<div className="linkmenu-row" >
|
||||||
{
|
{
|
||||||
this.state.menulinklist.map((item,key)=>{
|
this.state.menulinklist.map((item,key)=>{
|
||||||
return(item.level==5?<Link key={key} to={item.router} onClick={()=>this.btnfn(item)} className={item.router.includes(pathnamestr)?'menuactive':''}>{item.title}</Link>:null)
|
return(item.level==5?<Link key={key} to={item.router} onClick={()=>this.btnfn(item)} className={item.router.includes(pathnamestr)&&this.state.menulinklist.filter(it=>it.level==5).length>1?'menuactive':''}>{item.title}</Link>:null)
|
||||||
}) }
|
}) }
|
||||||
</div>
|
</div>
|
||||||
<span>数据最后更新时间:{window.timeshow}</span>
|
<span>数据最后更新时间:{window.timeshow}</span>
|
||||||
|
|
Loading…
Reference in New Issue