Merge branch 'master' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend

This commit is contained in:
姜棚 2021-11-29 14:32:45 +08:00
commit 6a935e75b0
3 changed files with 20 additions and 16 deletions

View File

@ -90,20 +90,23 @@ const req = (method, url, params, responseType) => {
if(res.status==200){
return res.json()
}else{
console.log(res);
switch (res.status) {
// 401: 未登录
case 401:
res.json().then(response =>{
if(response.code==403){
Notify.clear();
Notify.error( "没有权限");
break;
case 403:
Notify.clear();
Notify.error( "用户登录已失效,请重新登录");
sessionStorage.clear();
Notify.error(response.message);
setTimeout(() => {
window.location.href='/login';
}, 2000)
}else if(response.code==401){
Notify.clear();
Notify.error(response.message);
}
}
).catch();
break;
}
}

View File

@ -203,6 +203,8 @@ export default class App extends Component {
window.document.addEventListener('mouseover',function(){
window["mydata"].setState({lastTime:new Date().getTime()}); //更新操作时间
});
//根据权限菜单进行匹配
// timerstop=window.setInterval( window["mydata"].testTime, 1000);
}
// testTime(){
@ -247,10 +249,11 @@ export default class App extends Component {
<Link to="/extension" className={this.state.pathname=='/extension'?'active':''} onClick={()=>this.setState({pathname:'/extension'})}>推广</Link> */}
<Subnav listnav={this.state.navlist} time={window.time}/>
</div>
<div> <Icon type="help-circle" /> <a href="https://www.baidu.com/" target="_blank" className="help">帮助中心</a></div>
<div> <Icon type="help-circle" /> <a href="https://shimo.im/docs/wV3VVQP5W6I1nz3y/" target="_blank" className="help">帮助中心</a></div>
{/* 用户头像信息 */}
<div className="userImg dflexa">
{/* <Link to="https://youzan.com" target="_blank" className="mr15 helpcenter">帮助中心</Link> */}
{/* {!this.state.userInfo.head? <Avatar size="large"

View File

@ -40,10 +40,8 @@ function FormDom(props) {
items:[{path:'/home/plan-list',name:'营销计划管理'}]
}]
sessionStorage.setItem('menulinklist',JSON.stringify(arr));
let {authorization}=response;
sessionStorage.setItem('authorization',authorization);
sessionStorage.setItem('activeMenu',"营销计划管理");
sessionStorage.setItem('linkshowname',"营销计划管理");
setTimeout(()=>{
props.history.push('/home/plan-list')
},1000);