|
|
|
@ -7,38 +7,89 @@ class NewShixunModel extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
|
super(props)
|
|
|
|
|
this.state={
|
|
|
|
|
diff:0,
|
|
|
|
|
shixun_list:undefined,
|
|
|
|
|
shixuns_count:undefined,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.log(this.props.type)
|
|
|
|
|
|
|
|
|
|
if(this.props.type==='shixun'){
|
|
|
|
|
let url="/shixuns/shixun_list.json"
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
|
|
|
|
|
if(response.data){
|
|
|
|
|
console.log(response.data);
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
let url="/shixuns/shixun_list.json"
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
|
type:'all', //这是带过来的值
|
|
|
|
|
status:'all',
|
|
|
|
|
search:undefined,
|
|
|
|
|
diff:0,
|
|
|
|
|
order:'desc',
|
|
|
|
|
page:1,
|
|
|
|
|
limit:15,
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
|
|
|
|
|
if(response.data){
|
|
|
|
|
this.setState({
|
|
|
|
|
shixun_list:response.data.shixun_list,
|
|
|
|
|
shixuns_count:response.data.shixuns_count,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DropdownClick=(type)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
diff:type
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
// let {Searchvalue,type,hometypepvisible,shixunmodallist,newshixunmodallist,}=this.state;
|
|
|
|
|
let {diff,datas,shixun_list,shixuns_count}=this.state;
|
|
|
|
|
// let {visible,patheditarry}=this.props;
|
|
|
|
|
|
|
|
|
|
const menus = (
|
|
|
|
|
<Menu>
|
|
|
|
|
<Menu.Item>
|
|
|
|
|
<a target="_blank" rel="noopener noreferrer" href="http://www.alipay.com/">
|
|
|
|
|
<a onClick={()=>this.DropdownClick(0)}>
|
|
|
|
|
所有
|
|
|
|
|
</a>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
<Menu.Item >
|
|
|
|
|
<a onClick={()=>this.DropdownClick(1)} >
|
|
|
|
|
初级
|
|
|
|
|
</a>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
<Menu.Item>
|
|
|
|
|
<a target="_blank" rel="noopener noreferrer" href="http://www.taobao.com/">
|
|
|
|
|
<a onClick={()=>this.DropdownClick(2)}>
|
|
|
|
|
中级
|
|
|
|
|
</a>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
<Menu.Item>
|
|
|
|
|
<a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">
|
|
|
|
|
<a onClick={()=>this.DropdownClick(3)}>
|
|
|
|
|
高级
|
|
|
|
|
</a>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
<Menu.Item>
|
|
|
|
|
<a target="_blank" rel="noopener noreferrer" href="http://www.tmall.com/">
|
|
|
|
|
顶级
|
|
|
|
|
<a onClick={()=>this.DropdownClick(4)}>
|
|
|
|
|
顶级
|
|
|
|
|
</a>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
@ -84,7 +135,7 @@ class NewShixunModel extends Component{
|
|
|
|
|
<p className="font-12 ml5 fl">
|
|
|
|
|
|
|
|
|
|
<span className="fl color-grey-9 mr20">已选 <span className={"color-blue"}>6</span> 个实训</span>
|
|
|
|
|
<span className="fl color-grey-9 mr20">共 <span className={"color-blue"}>5</span> 个实训</span>
|
|
|
|
|
<span className="fl color-grey-9 mr20">共 <span className={"color-blue"}>{shixuns_count===undefined?"":shixuns_count}</span> 个实训</span>
|
|
|
|
|
|
|
|
|
|
<span className="fl color-grey-9 pointer mr30">
|
|
|
|
|
<a className={" color-grey-6"}>学习人数</a>
|
|
|
|
@ -96,7 +147,7 @@ class NewShixunModel extends Component{
|
|
|
|
|
|
|
|
|
|
<Dropdown overlay={menus}>
|
|
|
|
|
<a className="ant-dropdown-link color-grey-6">
|
|
|
|
|
难度<Icon type="down" className={"color-grey-6"}/>
|
|
|
|
|
{diff===0?"所有":diff===1?"初级":diff===2?"中级":diff===3?"高级":diff===4?"顶级":""}<Icon type="down" className={"color-grey-6"}/>
|
|
|
|
|
</a>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</p>
|
|
|
|
@ -107,31 +158,45 @@ class NewShixunModel extends Component{
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{/*author_name: "刘强"*/}
|
|
|
|
|
{/*author_school_name: "湖南工业大学"*/}
|
|
|
|
|
{/*challenge_names: ["打印输出 Hello World", "打印输出图形", "求3个数的最大值", "熟悉C语言调试过程"]*/}
|
|
|
|
|
{/*challenges_count: 4*/}
|
|
|
|
|
{/*content: {}*/}
|
|
|
|
|
{/*id: 1504*/}
|
|
|
|
|
{/*identifier: "tb7hw62n"*/}
|
|
|
|
|
{/*level: "初级"*/}
|
|
|
|
|
{/*study_count: 6002*/}
|
|
|
|
|
{/*subjects: [{id: 138, name: "C语言程序设计"}, {id: 180, name: "C语言程序设计(湖南师范大学)"}, {id: 211, name: "移动云启 —— C语言练习题库"}]*/}
|
|
|
|
|
{/*title: "C语言程序设计编辑与调试环境"*/}
|
|
|
|
|
{/*visits_count: 9419*/}
|
|
|
|
|
{shixun_list===undefined?"":shixun_list.length===0?"":shixun_list.map((item,key)=>{
|
|
|
|
|
console.log(item.content)
|
|
|
|
|
return(
|
|
|
|
|
<div className="mt20 edu-back-white pd20 relativef newshixunlist" key={key}>
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<div className="item-body">
|
|
|
|
|
<div className="clearfix ds pr contentSection">
|
|
|
|
|
<a title={item.title} className="ml30 fl font-16 color-dark maxwidth900">
|
|
|
|
|
{item.title}
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div className="mt20 edu-back-white pd20 relativef newshixunlist">
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<div className="item-body">
|
|
|
|
|
<div className="clearfix ds pr contentSection">
|
|
|
|
|
<a title={""} className="ml30 fl font-16 color-dark maxwidth900">
|
|
|
|
|
移动云启 ——JAVA面向对象
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div className="cl"></div>
|
|
|
|
|
<p className="newshixunmodelmidfont">
|
|
|
|
|
已被广泛应用于移动及桌面应用程序、Web应用程序、分布式系统和嵌入式系统应用程序等各个领域的软件开发中。
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<p className="newshixunmodelbotfont">
|
|
|
|
|
已被广泛应用于移动及桌面应用程序、Web应用程序、分布式系统和嵌入式系统应用程序等各个领域的软件开发中。
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div className={"newshixunpd030"}>
|
|
|
|
|
<div className="xuxianpro"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="cl"></div>
|
|
|
|
|
<p className="newshixunmodelmidfont">
|
|
|
|
|
{/*{item.content}*/}
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<p className="newshixunmodelbotfont">
|
|
|
|
|
已被广泛应用于移动及桌面应用程序、Web应用程序、分布式系统和嵌入式系统应用程序等各个领域的软件开发中。
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<div className={"newshixunpd030"}>
|
|
|
|
|
<div className="xuxianpro"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p className="color-grey panel-lightgrey fl ml30">
|
|
|
|
|
<style>
|
|
|
|
|
{`
|
|
|
|
|
<p className="color-grey panel-lightgrey fl ml30">
|
|
|
|
|
<style>
|
|
|
|
|
{`
|
|
|
|
|
.ant-breadcrumb-separator{
|
|
|
|
|
color: #D7D7D7 !important;
|
|
|
|
|
}
|
|
|
|
@ -139,38 +204,41 @@ class NewShixunModel extends Component{
|
|
|
|
|
color: #999 !important;
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
<Breadcrumb separator="|">
|
|
|
|
|
<Breadcrumb.Item>Home</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>Application Center</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>Application List</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>An Application</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>An Application</Breadcrumb.Item>
|
|
|
|
|
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
<Dropdown overlay={menus}>
|
|
|
|
|
<a className="ant-dropdown-link fl ml30 newshixunfont12 color-blue" >
|
|
|
|
|
难度<Icon className={"color-blue"} type="down" />
|
|
|
|
|
</a>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</style>
|
|
|
|
|
<Breadcrumb separator="|">
|
|
|
|
|
<Breadcrumb.Item>{item.author_name}</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>{item.author_school_name}</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>难度系数:{item.level}</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>学习人数:{item.study_count}</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item>{item.author_name}</Breadcrumb.Item>
|
|
|
|
|
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
<Dropdown overlay={menus}>
|
|
|
|
|
<a className="ant-dropdown-link fl ml30 newshixunfont12 color-blue" >
|
|
|
|
|
难度<Icon className={"color-blue"} type="down" />
|
|
|
|
|
</a>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div className={" edu-txt-center pd303010"}>
|
|
|
|
|
|
|
|
|
|
{shixun_list===undefined?"":shixun_list.length>15?<div className={" edu-txt-center pd303010"}>
|
|
|
|
|
<Pagination
|
|
|
|
|
showQuickJumper
|
|
|
|
|
defaultCurrent={1}
|
|
|
|
|
pageSize={15}
|
|
|
|
|
// total={datas===undefined?"":datas.task_count}
|
|
|
|
|
total={shixuns_count===undefined?"":shixuns_count}
|
|
|
|
|
// current={page}
|
|
|
|
|
// onChange={this.PaginationCourse}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>:""}
|
|
|
|
|
|
|
|
|
|
<div className={" edu-txt-center padding20-30"}>
|
|
|
|
|
<Button className={"mr20 newshixunmode"}>取消</Button>
|
|
|
|
|