dev_aliyun
杨树明 5 years ago
parent 60c4b45132
commit 465d03b33e

@ -261,7 +261,12 @@ class NewHeader extends Component {
if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){
window.location.href = "/login";
}else{
return
}else if(this.state.current_user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){
window.location.href = "/login";
return
}
if(sum===1){
window.location.href = "/courses/new";
}else if(sum===2){
@ -273,8 +278,6 @@ class NewHeader extends Component {
}
}
}
render() {
let {careerslist,isLogin,current_user,ImageUrl,ecUrl,ImageUrlType,project_packages_url} = this.state;
// const isLogin = isLogintype; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。

Loading…
Cancel
Save