diff --git a/src/App.css b/src/App.css index 93aeeb86..dddcfcb3 100644 --- a/src/App.css +++ b/src/App.css @@ -178,7 +178,7 @@ resize: none; .zent-btn-primary.zent-btn-disabled.zent-btn { - background-color: #B8BCC2 !important; + background-color: #f1f2f3 !important; } .modal{ @@ -189,5 +189,5 @@ resize: none; top: 0; background-color: rgba(0,0,0,0.5); z-index: 9999; - + } \ No newline at end of file diff --git a/src/assets/api.js b/src/assets/api.js index 41f7dc68..c7257324 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -115,10 +115,11 @@ const req = (method, url, params, responseType) => { } export const handelResponse = (res, cb, errCb) => { - if (res.code == 200) { + console.log(118,res); + if (res&&res.code == 200) { cb(res.data, res.message) } else { - if (typeof errCb == 'function') { + if (res&&typeof errCb == 'function') { errCb(res.message) } } @@ -587,7 +588,7 @@ export const getSystemTemplate= (data) => { //退出登录接口 export const postLogOut = (data) => { - return req('post', baseurl + "/auth/logout", data) + return req('get', baseurl + "/auth/logout", data) } export { diff --git a/src/components/subnav/main.js b/src/components/subnav/main.js index 4b86fb01..1d7f9a37 100644 --- a/src/components/subnav/main.js +++ b/src/components/subnav/main.js @@ -39,6 +39,7 @@ export default class topNav extends React.Component{ } //返回 backFn(items){ + this.setState({'pathname2':items[0].path}); sessionStorage.setItem('showflag',true) sessionStorage.setItem('pathname2',items[0].path) @@ -53,16 +54,17 @@ export default class topNav extends React.Component{ } render(){ + let history0= window.history.length<=1; let routeflag=sessionStorage.getItem('showflag') let breaknav=JSON.parse(sessionStorage.getItem('breaknav')) 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')||pathnamestr.includes('key-edit')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit'); + let breakflag=pathnamestr.includes('add')||pathnamestr.includes('key-list')||pathnamestr.includes('key-edit')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('product-edit'); let sedcbreakflag=pathnamestr.includes('plan-create'); let planbreakflag = pathnamestr.includes('mytempMould') let editbreakflag = pathnamestr.includes('edittemplate') - let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit'); + let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit')||pathnamestr.includes('product-edit')||pathnamestr.includes('plan-edit'); if(breakchange){ breaknav=JSON.parse(sessionStorage.getItem('breakchangenav')) } @@ -109,9 +111,12 @@ export default class topNav extends React.Component{ breaknav.map((item,key)=>{ return(