@ -305,12 +305,11 @@ class NewHeader extends Component {
} else {
activeIndex = true ;
}
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.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(match.path.startsWith("/ec_courses"))
return (
< div className = "newHeader" id = "nHeader" >
@ -352,7 +351,7 @@ class NewHeader extends Component {
< / d i v >
< / d i v >
< / M o d a l >
< a href = "/" className = { " fl "} >
< a href = "/" className = { " fl ml25 "} >
{ ImageUrlType === true ? < img alt = "高校智能化教学与实训平台" className = "fl" src = { getImageUrl ( ImageUrl ) } style = { { height : '60px' } } / > : < img alt = "高校智能化教学与实训平台" className = "logoimg" src = { getImageUrl ( ImageUrl ) } / > }
< / a >
< div className = "educontent" >
@ -401,51 +400,52 @@ class NewHeader extends Component {
< li className = { ` ${ activeForums === true ? 'active' : '' } ` } > < a href = "/forums" > 交流问答 < / a > < / l i >
< li className = { ` ${ activeCourses === true ? 'active' : '' } ` } style = { { display : ecUrl === null || ecUrl === undefined || ecUrl === "" ? 'none' : 'block' } } > < a href = { ecUrl } > { ecUrl === null || ecUrl === undefined || ecUrl === "" ? '' : '工程认证' } < / a > < / l i >
< / u l >
< style >
{
`
. mar55 {
margin - right : 55 px ;
< / d i v >
< / d i v >
{ / * < s p a n c l a s s N a m e = " f o n t - 1 5 f r m t 1 7 " >
< %= link _to '登录' , signin _path , : className => "mr5" % >
< em className = "vertical-line" > < / e m >
< %= link _to '注册' , user _join _path , : className => "ml5" % >
< /span>*/ }
< style >
{
`
. marf28 {
margin - right : - 28 px ;
}
`
}
< / s t y l e >
< div className = "posi-search mar55" id = "posi-search" style = { { display : 'none' } } >
< div className = "search-all clearfix" >
{ /*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">× </a>-->*/ }
< div className = "fl pr search-clear edu-menu-panel" style = { { display : 'none' } } >
< input type = "hidden" id = "search_type" value = "1" > < / i n p u t >
< span className = "searchkey" > 实训 < / s p a n >
< i className = "fa fa-angle-down ml5 font-16" > < / i >
< ul id = "searchkey" className = "edu-menu-list edu-txt-center" style = { { minWidth : '80px' , right : '-10px' , top : '50px' } } >
< li > < a href = "javascript:void(0)" > 实训 < / a > < / l i >
< li > < a href = "javascript:void(0)" > 课堂 < / a > < / l i >
< li > < a href = "javascript:void(0)" > 用户 < / a > < / l i >
< / u l >
< / d i v >
< input type = "text" className = "search-input fl" id = "search-input" name = "search_keyword" placeholder = "实践课程/翻转课堂/开发社区/交流问答" / >
< a href = "javascript:void(0)" className = "search-icon fl" id = "header_keyword_search" >
{ /*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*/ }
< i className = "iconfont icon-sousuo color-blue" > < / i >
}
< / s t y l e >
< div className = "posi-search marf28 " id = "posi-search" style = { { display : 'none' } } >
< div className = "search-all clearfix" >
{ /*<!--<a href="javascript:void(0)" className="search-clear fl" onclick="closeSearch();">× </a>-->*/ }
< div className = "fl pr search-clear edu-menu-panel" style = { { display : 'none' } } >
< input type = "hidden" id = "search_type" value = "1" > < / i n p u t >
< span className = "searchkey" > 实训 < / s p a n >
< i className = "fa fa-angle-down ml5 font-16" > < / i >
< ul id = "searchkey" className = "edu-menu-list edu-txt-center" style = { { minWidth : '80px' , right : '-10px' , top : '50px' } } >
< li > < a href = "javascript:void(0)" > 实训 < / a > < / l i >
< li > < a href = "javascript:void(0)" > 课堂 < / a > < / l i >
< li > < a href = "javascript:void(0)" > 用户 < / a > < / l i >
< / u l >
< / d i v >
< input type = "text" className = "search-input fl" id = "search-input" name = "search_keyword" placeholder = "实践课程/翻转课堂/开发社区/交流问答" / >
< a href = "javascript:void(0)" className = "search-icon fl" id = "header_keyword_search" >
{ /*<i className="fa fa-search font-16 mt23 color-grey-6"></i>*/ }
< i className = "iconfont icon-sousuo color-blue" > < / i >
< / a >
{ / * T O D O 需 要 服 务 端 接 口 提 供 最 近 搜 索
< / a >
{ / * T O D O 需 要 服 务 端 接 口 提 供 最 近 搜 索
< div class = "search-content none" style = "width: 86%;left: 0px;" >
< div class = "search-title" > 最近搜索 < / d i v >
< div > < a href = "javascript:void(0)" class = "search_history" > 绿盟 < / a > < / d i v >
< div > < a href = "javascript:void(0)" class = "search_history" > qwe < / a > < / d i v >
< /div>*/ }
< / d i v >
< / d i v >
< / d i v >
{ / * < s p a n c l a s s N a m e = " f o n t - 1 5 f r m t 1 7 " >
< %= link _to '登录' , signin _path , : className => "mr5" % >
< em className = "vertical-line" > < / e m >
< %= link _to '注册' , user _join _path , : className => "ml5" % >
< /span>*/ }
< / d i v >
< / d i v >
< div style = { { display : isLogin === true ? 'block' : 'none' } } >
< div className = "fr edu-menu-panel " style = { { height : '60px' } } >
< div className = "fr edu-menu-panel mr10 mtf20 mr25" style = { { height : '60px' } } >
< a href = { ` /users/ ${ current _user . login } ` } className = "fl" >
< img alt = "头像" className = "radius mt13" height = "34" id = "nh_user_logo" nhname = "avatar_image"
src = { ` /images/ ${ current _user . image _url } ` } width = "34" >
@ -465,9 +465,20 @@ class NewHeader extends Component {
< / d i v >
< / d i v >
< div style = { { display : isLogin === false ? 'block' : 'none' } } >
< span className = "font-15 fr mt15" >
< style >
{
`
. mtf4 {
margin - top : - 4 px ;
}
. mtf20 {
margin - top : - 20 px ;
}
`
}
< / s t y l e >
< div style = { { display : isLogin === false ? 'block' : 'none' } } className = { "fr mtf4 mr25" } >
< span className = "font-15 fr" >
< a href = "/login" className = "mr5 color-white" > 登录 < / a >
< em className = "vertical-line" > < / e m >
< a href = "/user_join" className = "mr5 color-white" > 注册 < / a >
@ -475,7 +486,7 @@ class NewHeader extends Component {
< / d i v >
< div className = "fr head-right mr10 ">
< div className = "fr head-right mr10 mtf20 " >
< a href = "javascript:void(0)" id = "search-open" className = "fl mr30 headIcon" >
{ / * " / i m a g e s / e d u c o d e r / i c o n / s e a r c h . s v g "
< img src = { getImageUrl ( ` images/educoder/icon/search.svg ` ) } / > * / }
@ -554,7 +565,7 @@ class NewHeader extends Component {
< / d i v >
* / }
< / d i v >
< / d i v >
< / d i v >
) ;