高亮联调

dev_cs
杨树明 5 years ago
parent 41e1d59378
commit f98f112701

@ -15,31 +15,31 @@ class NewShixunModel extends Component{
page:1,
type:'all',
status:'all',
search:undefined,
keyword:undefined,
order:'desc',
diff:0,
limit:15,
}
}
componentDidMount() {
let{page,type,search,order,diff,limit}=this.state;
let{page,type,keyword,order,diff,limit}=this.state;
let status=this.props.statustype===undefined?'all':'published';
this.setState({
status:status
})
this.getdatalist(page,type,status,search,order,diff,limit)
this.getdatalist(page,type,status,keyword,order,diff,limit)
}
getdatalist=(page,type,status,search,order,diff,limit,pagetype)=>{
getdatalist=(page,type,status,keyword,order,diff,limit,pagetype)=>{
this.setState({
isspinning:true
})
let url="/shixuns/shixun_list.json"
let url="/shixun_lists.json"
axios.get(url,{params:{
page,
type,
status,
search,
keyword,
order,
diff,
limit
@ -72,8 +72,8 @@ class NewShixunModel extends Component{
this.setState({
diff:diff
})
let{page,type,status,search,order,limit}=this.state;
this.getdatalist(page,type,status,search,order,diff,limit)
let{page,type,status,keyword,order,limit}=this.state;
this.getdatalist(page,type,status,keyword,order,diff,limit)
}
ItsCourse=(item)=>{
@ -130,8 +130,8 @@ class NewShixunModel extends Component{
newallGrouplist.push({page:pageNumber,list:[]})
}
let{type,status,search,order,diff,limit}=this.state;
this.getdatalist(pageNumber,type,status,search,order,diff,limit,"pagetype")
let{type,status,keyword,order,diff,limit}=this.state;
this.getdatalist(pageNumber,type,status,keyword,order,diff,limit,"pagetype")
this.setState({
page:pageNumber,
allGrouplist:newallGrouplist
@ -143,8 +143,8 @@ class NewShixunModel extends Component{
this.setState({
type:value
})
let{page,status,search,order,diff,limit}=this.state;
this.getdatalist(page,value,status,search,order,diff,limit)
let{page,status,keyword,order,diff,limit}=this.state;
this.getdatalist(page,value,status,keyword,order,diff,limit)
}
updatedlist=(order)=>{
@ -153,28 +153,28 @@ class NewShixunModel extends Component{
this.setState({
order:"asc"
})
let{type,page,status,search,diff,limit}=this.state;
this.getdatalist(page,type,status,search,"asc",diff,limit)
let{type,page,status,keyword,diff,limit}=this.state;
this.getdatalist(page,type,status,keyword,"asc",diff,limit)
}else{
this.setState({
order:"desc"
})
let{type,page,status,search,diff,limit}=this.state;
this.getdatalist(page,type,status,search,"desc",diff,limit)
let{type,page,status,keyword,diff,limit}=this.state;
this.getdatalist(page,type,status,keyword,"desc",diff,limit)
}
}
setdatafunsval=(e)=>{
this.setState({
search:e.target.value
keyword:e.target.value
})
}
setdatafuns=(value)=>{
this.setState({
search:value,
keyword:value,
type:undefined,
page:1,
status:'all',
@ -265,8 +265,8 @@ class NewShixunModel extends Component{
this.setState({
status:status
})
let{page,type,search,order,diff,limit}=this.state;
this.getdatalist(page,type,status,search,order,diff,limit)
let{page,type,keyword,order,diff,limit}=this.state;
this.getdatalist(page,type,status,keyword,order,diff,limit)
}
render() {
@ -363,7 +363,7 @@ class NewShixunModel extends Component{
style={{ width: "800px"}}
className="packinput"
placeholder="实训信息 / 院校名称 / 创建者"
value={this.state.search}
value={this.state.keyword}
enterButton={<span>搜索</span>}
onInput={(e)=>this.setdatafunsval(e)}
onSearch={ (value)=>this.setdatafuns(value)} />
@ -420,13 +420,13 @@ class NewShixunModel extends Component{
className="fl task-hide edu-txt-left mt3"
name="shixun_homework[]"
></Checkbox>
<a target="_blank" href={`/shixuns/${item.identifier}/challenges`} title={item.title} className="ml15 fl font-16 color-dark maxwidth1100">
{item.title}
<a target="_blank" href={`/shixuns/${item.identifier}/challenges`} title={item.title} className="ml15 fl font-16 color-dark maxwidth1100"
dangerouslySetInnerHTML={{__html: item.title}}
>
</a>
<div className="cl"></div>
{JSON.stringify(item.content) == "{}"?"":<div className="newshixunmodelmidfont">
{/*{item.description}*/}
{JSON.stringify(item.description) == "{}"?"":<div className="newshixunmodelmidfont" dangerouslySetInnerHTML={{__html: item.description}}>
</div>}
{item.challenge_names.length===0?"":<div className="newshixunmodelbotfont">

@ -149,6 +149,14 @@
color: #999999;
margin-top: 15px;
margin-left: 30px;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
max-width: 1100px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.newshixunmodelbotfont{
@ -236,4 +244,9 @@
.mt3 {
margin-top: 3px !important;
}
}
.highlight{
color: #4CACFF;
}

Loading…
Cancel
Save