diff --git a/src/components/subnav/main.js b/src/components/subnav/main.js index af3b0784..26d64a48 100644 --- a/src/components/subnav/main.js +++ b/src/components/subnav/main.js @@ -21,7 +21,7 @@ export default class topNav extends React.Component{ showlinkmenu(e,item){ let self=this; try{ - item.child.forEach(item=>{ + item.children.forEach(item=>{ if(item.level ===5){ sessionStorage.setItem('pathname2',item.router); throw '终止循环' @@ -30,11 +30,11 @@ export default class topNav extends React.Component{ }catch(e){ } self.setState({'linkshowname':item.title}); - self.setState({'menulinklist':item.child}); + self.setState({'menulinklist':item.children}); // 防止刷新页面,导航签清空 - sessionStorage.setItem('menulinklist',JSON.stringify(item.child)); + sessionStorage.setItem('menulinklist',JSON.stringify(item.children)); sessionStorage.setItem('showflag',true); sessionStorage.setItem('linkshowname',item.title); } @@ -80,7 +80,7 @@ export default class topNav extends React.Component{ { this.state.navlists.map((item,i)=>{ return ( - item.child&&item.child.length>0?this.showlinkmenu(e,item)} >{item.title}:null + item.children&&item.children.length>0?this.showlinkmenu(e,item)} >{item.title}:null ) }) @@ -95,7 +95,7 @@ export default class topNav extends React.Component{
{ this.state.menulinklist.map((item,key)=>{ - return(item.level==5?this.btnfn(item)} className={pathnameBreak==item.router&&item.child.length>=1?'menuactive':''}>{item.title}:null) + return(item.level==5?this.btnfn(item)} className={pathnameBreak==item.router&&item.children.length>=1?'menuactive':''}>{item.title}:null) }) }
数据最后更新时间:{window.timeshow} diff --git a/src/pages/login/loginform.js b/src/pages/login/loginform.js index 30c4bfee..dd359e49 100644 --- a/src/pages/login/loginform.js +++ b/src/pages/login/loginform.js @@ -57,10 +57,10 @@ function FormDom(props) { sessionStorage.setItem('activeMenu',JSON.stringify(response.menu)); try{ menuList.forEach(item=>{ - if(item.child&&item.child.length>0){ - let obj=item.child.filter(item=>item.level==5); + if(item.children&&item.children.length>0){ + let obj=item.children.filter(item=>item.level==5); sessionStorage.setItem('pathname2',obj[0].router); - sessionStorage.setItem('menulinklist',JSON.stringify(item.child)); + sessionStorage.setItem('menulinklist',JSON.stringify(item.children)); if(item.id==16){ sessionStorage.setItem('linkshowname',"营销计划管理"); setTimeout(()=>{