diff --git a/src/pages/login/loginform.js b/src/pages/login/loginform.js index bda701bc..ec62d710 100644 --- a/src/pages/login/loginform.js +++ b/src/pages/login/loginform.js @@ -89,8 +89,7 @@ const getAccountList = () => { JSON.stringify(response.menu) ); let market = menuList.filter((item) => item.id == 16); - console.log(91,market); - if (market.length>0) { + if (market && market[0].children.length > 0) { //菜单有营销计划 sessionStorage.setItem("linkshowname", "营销计划管理"); sessionStorage.setItem("pathname2", "/home/plan-list"); @@ -101,9 +100,12 @@ const getAccountList = () => { setTimeout(() => { props.history.replace("/home/plan-list"); }, 1000); + console.log(104,market); } else { + console.log(104,market); try { menuList.forEach((item) => { + if (item.children && item.children.length > 0) { item.children.forEach((it) => { if (it.level == 5) {