|
|
|
@ -31,6 +31,7 @@ class DetailTop extends Component{
|
|
|
|
|
}
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
let courseslist=[]
|
|
|
|
|
|
|
|
|
|
if(this.props.courses!=undefined&&this.props.courses.length!=0){
|
|
|
|
|
this.props.courses.map((item,key)=>{
|
|
|
|
|
if(1===key+1){
|
|
|
|
@ -44,6 +45,27 @@ class DetailTop extends Component{
|
|
|
|
|
courseslist:courseslist
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate=(prevProps)=> {
|
|
|
|
|
if(prevProps.courses!=this.props.courses){
|
|
|
|
|
let courseslist=[]
|
|
|
|
|
|
|
|
|
|
if(this.props.courses!=undefined&&this.props.courses.length!=0){
|
|
|
|
|
this.props.courses.map((item,key)=>{
|
|
|
|
|
if(1===key+1){
|
|
|
|
|
return(
|
|
|
|
|
courseslist.push(item)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
courseslist:courseslist
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
allow_deletepath=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:true,
|
|
|
|
@ -260,7 +282,7 @@ class DetailTop extends Component{
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.tag-orange .tag-name{
|
|
|
|
|
.pathoranges .tag-name{
|
|
|
|
|
display: block;
|
|
|
|
|
width: auto;
|
|
|
|
|
background-color: #FF6800;
|
|
|
|
@ -276,8 +298,8 @@ class DetailTop extends Component{
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
{this.props.courses===undefined?"":
|
|
|
|
|
<span className="tag-orange">
|
|
|
|
|
{detailInfoList===undefined?"":detailInfoList.excellent === false ? "" :
|
|
|
|
|
<span className="pathoranges">
|
|
|
|
|
<span className="tag-name mt6 ml10">开放课程</span>
|
|
|
|
|
</span>}
|
|
|
|
|
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
|
|
|
|
@ -348,7 +370,7 @@ class DetailTop extends Component{
|
|
|
|
|
|
|
|
|
|
{this.props.courses===undefined||this.props.courses.length===0?"":<div className="userNavs mt20">
|
|
|
|
|
|
|
|
|
|
<li className={"fl"}>
|
|
|
|
|
<li className={"fl pd4020"}>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
@ -444,7 +466,8 @@ class DetailTop extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
<li className={"fr"}>
|
|
|
|
|
|
|
|
|
|
<li className={"fr mr25"}>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
@ -454,6 +477,14 @@ class DetailTop extends Component{
|
|
|
|
|
background: rgba(191,191,191,1) !important;
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.mr51{
|
|
|
|
|
margin-right: 51px;
|
|
|
|
|
}
|
|
|
|
|
.pathbtens{
|
|
|
|
|
width: 150px !important;
|
|
|
|
|
height: 44px !important;
|
|
|
|
|
line-height: 44px !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
@ -461,31 +492,31 @@ class DetailTop extends Component{
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div key={key}>
|
|
|
|
|
{item.course_status.status===0?<a className="mr30 shixun_detail pointer fl user-colorgrey-green">即将开课</a>:""}
|
|
|
|
|
{item.course_status.status===1?<a className="mr30 shixun_detail pointer fl color-orange">{item.course_status.time}</a>:""}
|
|
|
|
|
{item.course_status.status===0?<div className="mr51 shixun_detail pointer fl user-colorgrey-green">即将开课</div>:""}
|
|
|
|
|
{item.course_status.status===1?<div className="mr51 shixun_detail pointer fl color-orange">{item.course_status.time}</div>:""}
|
|
|
|
|
{item.course_status.status===2?
|
|
|
|
|
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>:"":""}
|
|
|
|
|
detailInfoList.is_creator===true?<div className="mr51 shixun_detail pointer fl user-colorgrey-9b">已结束</div>:item.course_identity<6?
|
|
|
|
|
<div className="mr51 shixun_detail pointer fl user-colorgrey-9b">已结束</div>:"":""}
|
|
|
|
|
|
|
|
|
|
{item.course_status.status===0?
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt28" href={item.first_category_url} target="_blank">
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" href={item.first_category_url} target="_blank">
|
|
|
|
|
进入课堂
|
|
|
|
|
</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>:""}
|
|
|
|
|
</a>:item.course_identity<6?<div className="fr user_default_btn background191 font-18 mt28 pathbtens">报名成功</div>
|
|
|
|
|
:<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" 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 mt28" onClick={()=>this.JoinnowCourse(item.course_id)}>
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" onClick={()=>this.JoinnowCourse(item.course_id)}>
|
|
|
|
|
进入课堂
|
|
|
|
|
</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>:item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" href={item.first_category_url} target="_blank">
|
|
|
|
|
立即学习
|
|
|
|
|
</a>:<a className="fr user_default_btn task-btn-orange font-18 mt28" onClick={()=>this.JoinnowCourse(item.course_id)}>立即加入</a>:""}
|
|
|
|
|
</a>:<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" 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 mt28" href={item.first_category_url} target="_blank">
|
|
|
|
|
detailInfoList.is_creator===true?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" 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>:item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens" href={item.first_category_url} target="_blank">
|
|
|
|
|
进入课堂
|
|
|
|
|
</a>:<div className="fr user_default_btn background191 font-18 mt28">已结束</div>:""}
|
|
|
|
|
</a>:<div className="fr user_default_btn background191 font-18 mt28 pathbtens">已结束</div>:""}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
)})}
|
|
|
|
|