Merge branch 'master' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend
This commit is contained in:
commit
6a935e75b0
|
@ -90,21 +90,24 @@ const req = (method, url, params, responseType) => {
|
||||||
if(res.status==200){
|
if(res.status==200){
|
||||||
return res.json()
|
return res.json()
|
||||||
}else{
|
}else{
|
||||||
console.log(res);
|
|
||||||
switch (res.status) {
|
switch (res.status) {
|
||||||
// 401: 未登录
|
// 401: 未登录
|
||||||
case 401:
|
case 401:
|
||||||
Notify.clear();
|
res.json().then(response =>{
|
||||||
Notify.error( "没有权限");
|
if(response.code==403){
|
||||||
break;
|
Notify.clear();
|
||||||
case 403:
|
Notify.error(response.message);
|
||||||
Notify.clear();
|
setTimeout(() => {
|
||||||
Notify.error( "用户登录已失效,请重新登录");
|
window.location.href='/login';
|
||||||
sessionStorage.clear();
|
}, 2000)
|
||||||
setTimeout(() => {
|
}else if(response.code==401){
|
||||||
window.location.href='/login';
|
Notify.clear();
|
||||||
}, 2000)
|
Notify.error(response.message);
|
||||||
break;
|
}
|
||||||
|
}
|
||||||
|
).catch();
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -203,6 +203,8 @@ export default class App extends Component {
|
||||||
window.document.addEventListener('mouseover',function(){
|
window.document.addEventListener('mouseover',function(){
|
||||||
window["mydata"].setState({lastTime:new Date().getTime()}); //更新操作时间
|
window["mydata"].setState({lastTime:new Date().getTime()}); //更新操作时间
|
||||||
});
|
});
|
||||||
|
//根据权限菜单进行匹配
|
||||||
|
|
||||||
// timerstop=window.setInterval( window["mydata"].testTime, 1000);
|
// timerstop=window.setInterval( window["mydata"].testTime, 1000);
|
||||||
}
|
}
|
||||||
// testTime(){
|
// 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> */}
|
<Link to="/extension" className={this.state.pathname=='/extension'?'active':''} onClick={()=>this.setState({pathname:'/extension'})}>推广</Link> */}
|
||||||
<Subnav listnav={this.state.navlist} time={window.time}/>
|
<Subnav listnav={this.state.navlist} time={window.time}/>
|
||||||
</div>
|
</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">
|
<div className="userImg dflexa">
|
||||||
|
|
||||||
{/* <Link to="https://youzan.com" target="_blank" className="mr15 helpcenter">帮助中心</Link> */}
|
{/* <Link to="https://youzan.com" target="_blank" className="mr15 helpcenter">帮助中心</Link> */}
|
||||||
|
|
||||||
{/* {!this.state.userInfo.head? <Avatar size="large"
|
{/* {!this.state.userInfo.head? <Avatar size="large"
|
||||||
|
|
|
@ -40,10 +40,8 @@ function FormDom(props) {
|
||||||
items:[{path:'/home/plan-list',name:'营销计划管理'}]
|
items:[{path:'/home/plan-list',name:'营销计划管理'}]
|
||||||
}]
|
}]
|
||||||
sessionStorage.setItem('menulinklist',JSON.stringify(arr));
|
sessionStorage.setItem('menulinklist',JSON.stringify(arr));
|
||||||
let {authorization}=response;
|
sessionStorage.setItem('activeMenu',"营销计划管理");
|
||||||
sessionStorage.setItem('authorization',authorization);
|
|
||||||
sessionStorage.setItem('linkshowname',"营销计划管理");
|
sessionStorage.setItem('linkshowname',"营销计划管理");
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
props.history.push('/home/plan-list')
|
props.history.push('/home/plan-list')
|
||||||
},1000);
|
},1000);
|
||||||
|
|
Loading…
Reference in New Issue