调整路由

This commit is contained in:
red-deng-deng 2021-11-27 17:32:43 +08:00
parent 791f470d80
commit ad60fd1ba2
3 changed files with 11 additions and 4 deletions

View File

@ -58,11 +58,11 @@ export default class topNav extends React.Component{
let pathnameBreak=sessionStorage.getItem('pathname2')
const pathname=window.location.href.lastIndexOf('\/');
const pathnamestr=window.location.href.substr(pathname);
let breakflag=pathnamestr.includes('add')||pathnamestr.includes('key-list');
let breakflag=pathnamestr.includes('add')||pathnamestr.includes('key-list')||pathnamestr.includes('key-edit')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit');
let sedcbreakflag=pathnamestr.includes('plan-create');
let planbreakflag = pathnamestr.includes('mytempMould')
let editbreakflag = pathnamestr.includes('edittemplate')
let breakchange = pathnamestr.includes('exchangecode-add')
let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit');
if(breakchange){
breaknav=JSON.parse(sessionStorage.getItem('breakchangenav'))
}

View File

@ -163,7 +163,7 @@ export default class acclist extends React.Component{
},
{
"path": "/home/exchangecode-add",
"name": "编辑兑换码"
"name": "编辑:"+rowData.title
}
]}]
sessionStorage.setItem("code_id",rowData.id)

View File

@ -471,6 +471,13 @@ export default class acclist extends React.Component{
let link = window.location.href.replace(window.location.hash,"#/home/plan-edit");
window.open(link, "_blank")
sessionStorage.setItem('showflag',true);
let arr=[{pagetitle:'编辑',items:[{path:'/home/key-list',name:'营销计划管理'},
{path:'/home/key-list',name:'编辑:'+row.title}
]}]
sessionStorage.setItem('breaknav',JSON.stringify(arr));
sessionStorage.setItem('linkshowname',"营销计划管理");
}
render(){
const { current, pageSize } = this.state;