|
|
|
@ -124,10 +124,39 @@ class ShixunPathSearch extends Component{
|
|
|
|
|
this.props.history.push(url)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//头部获取是否已经登录了
|
|
|
|
|
getUser=(url,type)=>{
|
|
|
|
|
if(this.props.checkIfLogin()===false){
|
|
|
|
|
this.props.showLoginDialog()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(this.props.checkIfProfileCompleted()===false){
|
|
|
|
|
this.props.showProfileCompleteDialog()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(url !== undefined || url!==""){
|
|
|
|
|
this.props.history.push(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let { order,sortList,search,page,total_count,select }=this.state;
|
|
|
|
|
let pathstype=false;
|
|
|
|
|
if(this.props&&this.props.mygetHelmetapi!=null){
|
|
|
|
|
let paths="/paths";
|
|
|
|
|
this.props.mygetHelmetapi.navbar.map((item,key)=>{
|
|
|
|
|
var reg = RegExp(item.link);
|
|
|
|
|
if(paths.match(reg)){
|
|
|
|
|
if(item.hidden===true){
|
|
|
|
|
pathstype=true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// console.log()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// console.log(this.props)
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
{this.state.updata===undefined?"":<UpgradeModals
|
|
|
|
@ -169,6 +198,10 @@ class ShixunPathSearch extends Component{
|
|
|
|
|
{/*<a href="javascript:void(0)" className={ order == "mine" ? "fl mr20 font-16 bestChoose active" : "fl mr20 font-16 bestChoose"} onClick={ () => this.changeStatus("mine")}>我的</a>*/}
|
|
|
|
|
<span className={ order == "updated_at" ? "active" : ""} onClick={ () => this.changeStatus("updated_at")}>最新</span>
|
|
|
|
|
<span className={ order == "myshixun_count" ? "active" : ""} onClick={ () => this.changeStatus("myshixun_count")}>最热</span>
|
|
|
|
|
{this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>}
|
|
|
|
|
{this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"":
|
|
|
|
|
pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<a className={ "fr font-16 bestChoose color-blue" } onClick={(url)=>this.getUser("/paths/new")}>+新建实践课程</a>:""
|
|
|
|
|
}
|
|
|
|
|
{/*<div className="fr mr5 search-new">*/}
|
|
|
|
|
{/*/!* <Search*/}
|
|
|
|
|
{/*placeholder="请输入路径名称进行搜索"*/}
|
|
|
|
|