import React,{Component} from 'react'; import { Modal,Checkbox,Select,Input,Tooltip,Spin,Icon,Drawer,Dropdown,Menu,Breadcrumb,Pagination,Button} from "antd"; import axios from'axios'; import './Newshixunmodel.css'; const Search = Input.Search; 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 }) } ItsCourse=(item)=>{ return
} render() { let {diff,datas,shixun_list,shixuns_count}=this.state; // let {visible,patheditarry}=this.props; const menus = ( ); return(
已选 6 个实训
共 {shixuns_count===undefined?"":shixuns_count} 个实训
学习人数
我的实训 全部实训
{/*{item.content}*/}
{item.challenge_names.map((item,key)=>{ return( {item} ) })}