|
|
|
@ -5,6 +5,7 @@ import SendPanel from "./sendPanel.js";
|
|
|
|
|
import { getImageUrl } from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
import Jointheclass from '../../modals/Jointheclass'
|
|
|
|
|
import './DetailTop.css';
|
|
|
|
|
|
|
|
|
|
const Search = Input.Search;
|
|
|
|
@ -22,7 +23,8 @@ class DetailTop extends Component{
|
|
|
|
|
deletepathtype:false,
|
|
|
|
|
cardsModalsavetype:false,
|
|
|
|
|
MenuItemskey:1,
|
|
|
|
|
courseslist:[]
|
|
|
|
|
courseslist:[],
|
|
|
|
|
Pathcourseid:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount(){
|
|
|
|
@ -37,7 +39,6 @@ class DetailTop extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
courseslist:courseslist
|
|
|
|
|
})
|
|
|
|
|
console.log(courseslist)
|
|
|
|
|
}
|
|
|
|
|
allow_deletepath=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
@ -171,15 +172,31 @@ class DetailTop extends Component{
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
console.log(courseslist)
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
MenuItemskey:keys,
|
|
|
|
|
courseslist:courseslist
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
|
|
|
|
|
JoinnowCourse=(id)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
yslJointhe:true,
|
|
|
|
|
Pathcourseid:id
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
ysljoinmodalCancel=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
yslJointhe:false
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
ysljoinmodalCanceltwo=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
yslJointhe:false
|
|
|
|
|
})
|
|
|
|
|
this.props.getdatasindex()
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
let{detailInfoList}=this.props;
|
|
|
|
|
let{Modalstype,Modalstopval,cardsModalcancel,cardsModalsave,Modalsbottomval,cardsModalsavetype,loadtype}=this.state;
|
|
|
|
|
const radioStyle = {
|
|
|
|
@ -219,6 +236,7 @@ class DetailTop extends Component{
|
|
|
|
|
loadtype={loadtype}
|
|
|
|
|
>
|
|
|
|
|
</Modals>
|
|
|
|
|
<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo()}></Jointheclass>
|
|
|
|
|
{/*<div className={this.props.courses===undefined||this.props.courses.length===0?"subhead_content":"subhead_content pt100"}>*/}
|
|
|
|
|
{
|
|
|
|
|
detailInfoList &&
|
|
|
|
@ -442,27 +460,25 @@ class DetailTop extends Component{
|
|
|
|
|
detailInfoList.is_creator===true?<a className="mr30 shixun_detail pointer fl user-colorgrey-9b">已结束</a>:item.course_identity<6?
|
|
|
|
|
<a className="mr30 shixun_detail pointer fl user-colorgrey-9b">已结束</a>:"":""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{item.course_status.status===0?
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt25" href={item.first_category_url} target="_blank">
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt28" href={item.first_category_url} target="_blank">
|
|
|
|
|
进入课堂
|
|
|
|
|
</a>:item.course_identity<6?<div className="fr user_default_btn background191 font-18 mt25">报名成功</div>
|
|
|
|
|
:<a className="fr user_default_btn task-btn-orange font-18 mt25" >立即报名</a>:""}
|
|
|
|
|
|
|
|
|
|
</a>:item.course_identity<6?<div className="fr user_default_btn background191 font-18 mt28">报名成功</div>
|
|
|
|
|
:<a className="fr user_default_btn task-btn-orange font-18 mt28" onClick={()=>this.JoinnowCourse(item.course_id)}>立即报名</a>:""}
|
|
|
|
|
|
|
|
|
|
{item.course_status.status===1?
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt25" href={item.first_category_url} target="_blank">
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt28" href={item.first_category_url} target="_blank">
|
|
|
|
|
进入课堂
|
|
|
|
|
</a>:item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt25" href={item.first_category_url} target="_blank">
|
|
|
|
|
</a>:item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28" href={item.first_category_url} target="_blank">
|
|
|
|
|
立即学习
|
|
|
|
|
</a>:<a className="fr user_default_btn task-btn-orange font-18 mt25" >立即加入</a>:""}
|
|
|
|
|
</a>:<a className="fr user_default_btn task-btn-orange font-18 mt28" onClick={()=>this.JoinnowCourse(item.course_id)}>立即加入</a>:""}
|
|
|
|
|
|
|
|
|
|
{item.course_status.status===2?
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt25" href={item.first_category_url} target="_blank">
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt28" href={item.first_category_url} target="_blank">
|
|
|
|
|
进入课堂
|
|
|
|
|
</a>:item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt25" href={item.first_category_url} target="_blank">
|
|
|
|
|
</a>:item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28" href={item.first_category_url} target="_blank">
|
|
|
|
|
进入课堂
|
|
|
|
|
</a>:<div className="fr user_default_btn background191 font-18 mt25">已结束</div>:""}
|
|
|
|
|
</a>:<div className="fr user_default_btn background191 font-18 mt28">已结束</div>:""}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
)})}
|
|
|
|
|