|
|
|
@ -94,6 +94,7 @@ class SearchPage extends Component{
|
|
|
|
|
//获取数据
|
|
|
|
|
getdata=(pages,type,keywords)=>{
|
|
|
|
|
let url = "/search.json";
|
|
|
|
|
this.setState({ loading: true })
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
|
keyword:keywords,
|
|
|
|
|
type:type,
|
|
|
|
@ -101,6 +102,8 @@ class SearchPage extends Component{
|
|
|
|
|
per_page:this.state.perpages,
|
|
|
|
|
}
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
this.setState({ loading: false })
|
|
|
|
|
|
|
|
|
|
if(response === undefined){
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
@ -118,11 +121,19 @@ class SearchPage extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
let {tab,count,data,page,perpages}=this.state;
|
|
|
|
|
let {tab,count,data,page,perpages, type }=this.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain clearfix">
|
|
|
|
|
<style>{`
|
|
|
|
|
.ziticor.iconfont {
|
|
|
|
|
margin-bottom: 2px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
font-size: 16px !important;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
<div className="headersear" >
|
|
|
|
|
<div style={{height:"53px"}}></div>
|
|
|
|
|
<Search
|
|
|
|
@ -145,7 +156,7 @@ class SearchPage extends Component{
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|
JSON.stringify(data) === "[]" ?
|
|
|
|
|
JSON.stringify(data) === "[]" && this.state.loading != true ?
|
|
|
|
|
|
|
|
|
|
<div id="forum_list" className="forum_table">
|
|
|
|
|
<div className="mh650 bjyss">
|
|
|
|
@ -228,12 +239,74 @@ class SearchPage extends Component{
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="foohter">
|
|
|
|
|
<div className="ziticor"><i className="fa fa-user ziticor"></i><span className="ml10">主讲:{item.author_name}</span></div>
|
|
|
|
|
<div className="ml10 ziticor "><span>{item.author_school_name}</span></div> <div className="ml20 ziticor"><i className="iconfont icon-shixunguanqia ziticor"></i><span>任务:<span className="ml10 ziticor">{item.challenges_count===undefined?0:item.challenges_count}</span></span></div>
|
|
|
|
|
<div className="ml20 ziticor"><i className="iconfont icon-chengyuan ziticor"></i><span>学习人数:<span className="ml10 ziticor">{item.study_count===undefined?0:item.study_count}</span></span></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="mt20">
|
|
|
|
|
{/* <span className="ziticor">
|
|
|
|
|
<i className="fa fa-user ziticor"></i><span className="ml10">主讲:{item.author_name}</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span className="ml10 ziticor "><span>{item.author_school_name}</span></span>
|
|
|
|
|
<span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-shixunguanqia ziticor"></i>
|
|
|
|
|
<span>任务:
|
|
|
|
|
<span className="ml10 ziticor">{item.challenges_count===undefined?0:item.challenges_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-chengyuan ziticor"></i>
|
|
|
|
|
<span>学习人数:
|
|
|
|
|
<span className="ml10 ziticor">{item.study_count===undefined?0:item.study_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span> */}
|
|
|
|
|
|
|
|
|
|
<span className="ziticor">
|
|
|
|
|
{/* <i className="fa fa-user ziticor"></i> */}
|
|
|
|
|
<span className="ml10">{item.author_name}</span></span>
|
|
|
|
|
<span className="ml10 ziticor "><span>{item.author_school_name}</span>
|
|
|
|
|
</span>
|
|
|
|
|
{!!item.challenges_count && <span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-shixunguanqia ziticor"></i>
|
|
|
|
|
<span>任务:
|
|
|
|
|
<span className="ml10 ziticor">{item.challenges_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span> }
|
|
|
|
|
{!!item.study_count && <span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-chengyuan ziticor"></i>
|
|
|
|
|
<span>学习人数:
|
|
|
|
|
<span className="ml10 ziticor">{item.study_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>}
|
|
|
|
|
|
|
|
|
|
{!!item.stage_shixuns_count && <span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-shixunguanqia ziticor"></i>
|
|
|
|
|
<span>实训数:
|
|
|
|
|
<span className="ml10 ziticor">{item.stage_shixuns_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>}
|
|
|
|
|
{type == 'subject' && !!item.visits_count && <span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-chengyuan ziticor" style={{ 'margin-bottom': '1px' }}></i>
|
|
|
|
|
<span>访问数:
|
|
|
|
|
<span className="ml10 ziticor">{item.visits_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>}
|
|
|
|
|
|
|
|
|
|
{!!item.members_count && <span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-chengyuan ziticor"></i>
|
|
|
|
|
<span>成员数:
|
|
|
|
|
<span className="ml10 ziticor">{item.members_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</span>}
|
|
|
|
|
|
|
|
|
|
{!!item.all_replies_count && <span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-huifu1 ziticor"></i>
|
|
|
|
|
<span>回复数:<span className="ml10 ziticor">{item.all_replies_count}</span></span>
|
|
|
|
|
</span> }
|
|
|
|
|
|
|
|
|
|
{/* <span className="ml20 ziticor">
|
|
|
|
|
<i className="iconfont icon-chengyuan ziticor"></i>
|
|
|
|
|
<span>
|
|
|
|
|
学习人数:<span className="ml10 ziticor">{item.study_count===undefined?0:item.study_count}</span></span></span> */}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|