解决bug,配置登陆menu为空提示

This commit is contained in:
red-deng-deng 2021-11-29 18:03:24 +08:00
parent 9f38dd120b
commit 413de286cb
4 changed files with 28 additions and 28 deletions

View File

@ -529,7 +529,7 @@ export default class edittemplate extends React.Component{
<div className="RootEditor">
<div className="schema-editor-container" data-editor-role="XJWebsitePage">
<div className="control page-title-control">
<h1>落地页设置</h1>
<h1>我的模板-落地页设置</h1>
<div className="page-title-control--content">
</div>
</div>
@ -653,7 +653,7 @@ export default class edittemplate extends React.Component{
</FormItem>
{
this.state.pageInfo ? (
<FormItem labelname="选择商品列表样式" prop="list">
<FormItem labelname="选择" prop="list">
<div>
</div>
</FormItem>

View File

@ -36,35 +36,35 @@ function FormDom(props) {
Notify.success(msg);
sessionStorage.setItem('showflag',true);
let menuList=response.menu;
try{
menuList.forEach(item=>{
if(item.id===16){
if(item.child&&item.child.length>0){
let obj=item.child.filter(item=>item.level==5);
sessionStorage.setItem('pathname2',obj[0].router);
sessionStorage.setItem('menulinklist',JSON.stringify(item.child));
}else{
if(response.menu&&response.menu.length>0){
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);
sessionStorage.setItem('pathname2',obj[0].router);
sessionStorage.setItem('menulinklist',JSON.stringify(item.child));
if(item.id==16){
sessionStorage.setItem('linkshowname',"营销计划管理");
setTimeout(()=>{
props.history.push('/home/plan-list')
},1000);
throw '终止循环'
}else{
sessionStorage.setItem('linkshowname',obj[0].title);
setTimeout(()=>{
props.history.push(obj[0].router)
},1000);
}
}
}
throw '终止循环'
}else{
}
})
}catch(e){
console.log(e)
}
sessionStorage.setItem('activeMenu',JSON.stringify(response.menu));
sessionStorage.setItem('linkshowname',"营销计划管理");
setTimeout(()=>{
props.history.push('/home/plan-list')
},1000);
})
}catch(e){
console.log(e)
}
}else{
Notify.clear();
Notify.warn('请先联系管理员配置权限菜单');
}
},err=>{
if(res.code==-2){
setYzmcode(true);

View File

@ -20,7 +20,7 @@ export default class add extends React.Component{
curstep:1,
menuList:[
{id:1,title:"营销计划",child:[{step:1,title:"新建计划"}]},
{id:2,title:"key",child:[{step:1,title:"生key"},{step:2,title:"绑定卡券"}]},
{id:2,title:"key",child:[{step:1,title:"生key"},{step:2,title:"绑定卡券"}]},
{id:3,title:"落地页",child:[{step:1,title:"绑定落地页"}]},
],
phone_list:[],

View File

@ -20,7 +20,7 @@ export default class add extends React.Component{
curstep:1,
menuList:[
{id:1,title:"营销计划",child:[{step:1,title:"新建计划"}]},
{id:2,title:"key",child:[{step:1,title:"生key"},{step:2,title:"绑定卡券"}]},
{id:2,title:"key",child:[{step:1,title:"生key"},{step:2,title:"绑定卡券"}]},
{id:3,title:"落地页",child:[{step:1,title:"绑定落地页"}]},
],
phone_list:[],