diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index 395e4096d..a8dad2eb4 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -22,18 +22,15 @@ class NewShixunModel extends Component{ } } componentDidMount() { - let{page,type,keyword,order,diff,limit}=this.state; - let status=this.props.statustype===undefined?'all':'published'; - this.setState({ - status:status - }) + let{page,type,keyword,order,diff,limit,status}=this.state; this.getdatalist(page,type,status,keyword,order,diff,limit) } - getdatalist=(page,type,status,keyword,order,diff,limit,pagetype)=>{ + getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype)=>{ this.setState({ isspinning:true }) + let status=this.props.statustype===undefined?newstatus:'published'; let url="/shixun_lists.json" axios.get(url,{params:{ page, @@ -441,7 +438,7 @@ class NewShixunModel extends Component{ ` } - {JSON.stringify(item.description) == "{}"?"":
+ {JSON.stringify(item.description) == "{}"?"":
} {item.challenge_names.length===0?"":
@@ -530,4 +527,28 @@ class NewShixunModel extends Component{ } } -export default NewShixunModel; \ No newline at end of file +export default NewShixunModel; + + +// {JSON.stringify(item.content) == "{}"?
+//
:
+// {item.content.description === undefined || item.content.description===0?"":item.content.description.map((item,key)=>{ +// return( +// {} +// ) +// })} +//
} +// +// {JSON.stringify(item.content) == "{}"?item.challenge_names.length===0?"":
+// {item.challenge_names.map((item,key)=>{ +// return( +// 第{key+1}关:{item} +// ) +// })} +//
:
+// {item.content.challenge_names === undefined || item.content.challenge_names===0?"":item.content.challenge_names.map((item,key)=>{ +// return( +// {} +// ) +// })} +//
} \ No newline at end of file