diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index e753b3bbc..ce38b2852 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -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={搜索} 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[]" > - - {item.title} +
- {JSON.stringify(item.content) == "{}"?"":