dev_aliyun
杨树明 5 years ago
parent 465d03b33e
commit cc8e049d90

@ -262,7 +262,7 @@ class NewHeader extends Component {
if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){ if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){
window.location.href = "/login"; window.location.href = "/login";
return return
}else if(this.state.current_user&&this.props.user.login=== ""||this.props.user&&this.props.user===null){ }else if(this.state.current_user&&this.state.current_user.login=== ""||this.state.current_user&&this.state.current_user===null){
window.location.href = "/login"; window.location.href = "/login";
return return
} }
@ -312,7 +312,7 @@ class NewHeader extends Component {
console.log(this.props.current_user&&this.props.current_user.login=== "") console.log(this.props.user&&this.props.user.is_student=== true||this.props.current_user&&this.props.current_user.is_student==true)
console.log(this.state.current_user) console.log(this.state.current_user)
// console.log(match.path.startsWith("/ec_courses")) // console.log(match.path.startsWith("/ec_courses"))
return ( return (
@ -481,7 +481,10 @@ class NewHeader extends Component {
<div className="edu-menu-list" style={{top: '60px',width:"240px"}}> <div className="edu-menu-list" style={{top: '60px',width:"240px"}}>
<div className="overPart"></div> <div className="overPart"></div>
<ul className="fl with50 edu-txt-center pr ul-leftline"> <ul className="fl with50 edu-txt-center pr ul-leftline">
<li><a onClick={()=>this.NewCoursesAndShixuns(1)}>新建课堂</a></li> {
this.props.user&&this.props.user.is_student=== true||this.props.current_user&&this.props.current_user.is_student==true?"":
<li><a onClick={()=>this.NewCoursesAndShixuns(1)}>新建课堂</a></li>
}
<li><a onClick={()=>this.NewCoursesAndShixuns(2)}>新建实训</a></li> <li><a onClick={()=>this.NewCoursesAndShixuns(2)}>新建实训</a></li>
<li><a onClick={()=>this.NewCoursesAndShixuns(3)}>新建实践课程</a></li> <li><a onClick={()=>this.NewCoursesAndShixuns(3)}>新建实践课程</a></li>
<li><a onClick={()=>this.NewCoursesAndShixuns(4)}>新建项目</a></li> <li><a onClick={()=>this.NewCoursesAndShixuns(4)}>新建项目</a></li>

Loading…
Cancel
Save