|
|
@ -5,10 +5,12 @@ import SendPanel from "./sendPanel.js";
|
|
|
|
import { getImageUrl } from 'educoder';
|
|
|
|
import { getImageUrl } from 'educoder';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
|
|
|
import AccountProfile from"../../user/AccountProfile";
|
|
|
|
import OpenCourse from './OpenCourse';
|
|
|
|
import OpenCourse from './OpenCourse';
|
|
|
|
import Jointheclass from '../../modals/Jointheclass'
|
|
|
|
import Jointheclass from '../../modals/Jointheclass';
|
|
|
|
import './DetailTop.css';
|
|
|
|
import './DetailTop.css';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Search = Input.Search;
|
|
|
|
const Search = Input.Search;
|
|
|
|
const RadioGroup = Radio.Group;
|
|
|
|
const RadioGroup = Radio.Group;
|
|
|
|
class DetailTop extends Component{
|
|
|
|
class DetailTop extends Component{
|
|
|
@ -262,6 +264,18 @@ class DetailTop extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
putappointment=()=>{
|
|
|
|
putappointment=()=>{
|
|
|
|
|
|
|
|
if(this.props.checkIfLogin()===false){
|
|
|
|
|
|
|
|
this.props.showLoginDialog()
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.props.current_user&&this.props.current_user.profile_completed===false){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
AccountProfiletype:true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
Modalstype:true,
|
|
|
|
Modalstype:true,
|
|
|
|
Modalstopval:"是否确认立即预约?",
|
|
|
|
Modalstopval:"是否确认立即预约?",
|
|
|
@ -321,9 +335,15 @@ class DetailTop extends Component{
|
|
|
|
this.cardsModalcancel()
|
|
|
|
this.cardsModalcancel()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hideAccountProfile=()=>{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
AccountProfiletype:false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
render(){
|
|
|
|
render(){
|
|
|
|
let{detailInfoList}=this.props;
|
|
|
|
let{detailInfoList}=this.props;
|
|
|
|
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype}=this.state;
|
|
|
|
let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,AccountProfiletype}=this.state;
|
|
|
|
const radioStyle = {
|
|
|
|
const radioStyle = {
|
|
|
|
display: 'block',
|
|
|
|
display: 'block',
|
|
|
|
height: '30px',
|
|
|
|
height: '30px',
|
|
|
@ -353,6 +373,12 @@ class DetailTop extends Component{
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
|
|
|
|
|
|
|
|
<div className={this.props.courses===undefined||this.props.courses.length===0?"subhead":applypath===false?"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb100":"subhead mb70"}>
|
|
|
|
<div className={this.props.courses===undefined||this.props.courses.length===0?"subhead":applypath===false?"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb100":"subhead mb70"}>
|
|
|
|
|
|
|
|
{AccountProfiletype===true?<AccountProfile
|
|
|
|
|
|
|
|
hideAccountProfile={()=>this.hideAccountProfile()}
|
|
|
|
|
|
|
|
{...this.props}
|
|
|
|
|
|
|
|
{...this.state}
|
|
|
|
|
|
|
|
/>:""}
|
|
|
|
|
|
|
|
|
|
|
|
<Modals
|
|
|
|
<Modals
|
|
|
|
modalsType={Modalstype}
|
|
|
|
modalsType={Modalstype}
|
|
|
|
modalsTopval={Modalstopval}
|
|
|
|
modalsTopval={Modalstopval}
|
|
|
@ -486,7 +512,7 @@ class DetailTop extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{this.props.courses===undefined||isadminallow_statistics===true?"":<div className="userNavs mt20" style={applypath===false?{}:this.state.MenuItemskey===this.props.courses.length?{height:'158px'}:{}}>
|
|
|
|
{this.props.courses===undefined||isadminallow_statistics===true?"":<div className="userNavs mt20" style={applypath===false?{}:this.state.MenuItemskey===this.props.courses.length?{height:'135px'}:{}}>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
`
|
|
|
|
`
|
|
|
@ -509,7 +535,7 @@ class DetailTop extends Component{
|
|
|
|
`
|
|
|
|
`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
{this.props.courses===undefined||this.props.courses.length===0?"":<li className={"fl pd4020"}>
|
|
|
|
{this.props.courses===undefined||this.props.courses.length===0?"":<li className={"fl pd4020 mt10"}>
|
|
|
|
|
|
|
|
|
|
|
|
{this.state.courseslist.map((item,key)=>{
|
|
|
|
{this.state.courseslist.map((item,key)=>{
|
|
|
|
if(item.course_identity<4){
|
|
|
|
if(item.course_identity<4){
|
|
|
@ -651,7 +677,10 @@ class DetailTop extends Component{
|
|
|
|
.mt26{
|
|
|
|
.mt26{
|
|
|
|
margin-top:26px;
|
|
|
|
margin-top:26px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mt10block{
|
|
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
}
|
|
|
|
`
|
|
|
|
`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
@ -671,8 +700,8 @@ class DetailTop extends Component{
|
|
|
|
<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox mt5":"fr user_default_btn background191 font-18 pathbtensbox mt26"}>预约报名成功</span>:""}
|
|
|
|
<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox mt5":"fr user_default_btn background191 font-18 pathbtensbox mt26"}>预约报名成功</span>:""}
|
|
|
|
|
|
|
|
|
|
|
|
{/*{item.course_status.status===0?<div className="mr51 shixun_detail pointer fl user-colorgrey-green pathdefault">即将开课</div>:""}*/}
|
|
|
|
{/*{item.course_status.status===0?<div className="mr51 shixun_detail pointer fl user-colorgrey-green pathdefault">即将开课</div>:""}*/}
|
|
|
|
{item.course_status.status===1?<div className="mr51 shixun_detail pointer fl color-orange pathdefault">{item.course_status.time}</div>:""}
|
|
|
|
{item.course_status.status===1?<div className="mr51 shixun_detail pointer fl color-orange pathdefault mt10">{item.course_status.time}</div>:""}
|
|
|
|
{item.course_status.status===2&&item.course_identity<6?<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault">已结束</div>:""}
|
|
|
|
{item.course_status.status===2&&item.course_identity<6?<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault mt10">已结束</div>:""}
|
|
|
|
{/*<div className="fr user_default_btn background191 font-18 mt28 pathbtens pathdefault">已结束</div>*/}
|
|
|
|
{/*<div className="fr user_default_btn background191 font-18 mt28 pathbtens pathdefault">已结束</div>*/}
|
|
|
|
{item.course_status.status===0?
|
|
|
|
{item.course_status.status===0?
|
|
|
|
item.course_identity<5?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens courseslistsa mr20" href={item.first_category_url} target="_blank">
|
|
|
|
item.course_identity<5?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens courseslistsa mr20" href={item.first_category_url} target="_blank">
|
|
|
@ -690,7 +719,7 @@ class DetailTop extends Component{
|
|
|
|
{item.course_status.status===2?
|
|
|
|
{item.course_status.status===2?
|
|
|
|
item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens courseslistsa mr20" href={item.first_category_url} target="_blank">
|
|
|
|
item.course_identity<6?<a className="fr user_default_btn task-btn-orange font-18 mt28 pathbtens courseslistsa mr20" href={item.first_category_url} target="_blank">
|
|
|
|
进入课堂
|
|
|
|
进入课堂
|
|
|
|
</a>:<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault">已结束</div>:""}
|
|
|
|
</a>:<div className="mr20 shixun_detail pointer fl user-colorgrey-9b pathdefault mt10">已结束</div>:""}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)})}
|
|
|
|
)})}
|
|
|
@ -712,8 +741,8 @@ class DetailTop extends Component{
|
|
|
|
:""}
|
|
|
|
:""}
|
|
|
|
|
|
|
|
|
|
|
|
{applypath===true&&this.props.courses.length===0?this.state.MenuItemskey===this.props.courses.length||coursestypes===true?<span className={coursestypes===true?"fl ml20 lineHeight0 relativewidth":"fl ml20 lineHeight0 relativewidth"}>
|
|
|
|
{applypath===true&&this.props.courses.length===0?this.state.MenuItemskey===this.props.courses.length||coursestypes===true?<span className={coursestypes===true?"fl ml20 lineHeight0 relativewidth":"fl ml20 lineHeight0 relativewidth"}>
|
|
|
|
<span>当前预约报名人数:<span className={"color-red mr5"}>{getappointmenttype===true?this.props.detailInfoList&&this.props.detailInfoList.participant_count+1:this.props.detailInfoList&&this.props.detailInfoList.participant_count}</span>人</span>
|
|
|
|
<span className={"mt10block"}>当前预约报名人数:<span className={"color-red mr5"}>{getappointmenttype===true?this.props.detailInfoList&&this.props.detailInfoList.participant_count+1:this.props.detailInfoList&&this.props.detailInfoList.participant_count}</span>人</span>
|
|
|
|
<span className={"font153"}>当预约报名人数达到 {this.props.detailInfoList&&this.props.detailInfoList.student_count} 人时即将开课</span>
|
|
|
|
<span className={"font153 mt10block"}>当预约报名人数达到 {this.props.detailInfoList&&this.props.detailInfoList.student_count} 人时即将开课</span>
|
|
|
|
{this.props.detailInfoList&&this.props.detailInfoList.has_participate===false?
|
|
|
|
{this.props.detailInfoList&&this.props.detailInfoList.has_participate===false?
|
|
|
|
getappointmenttype===true?<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn background191 font-18 pathbtensbox absolutewidth"}>预约报名成功</span>:<a className={coursestypes===true?"fr user_default_btn task-btn-28BE6C font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn task-btn-28BE6C font-18 pathbtensbox absolutewidth"} onClick={()=>this.putappointment()}>期待开课并预约报名</a>:
|
|
|
|
getappointmenttype===true?<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn background191 font-18 pathbtensbox absolutewidth"}>预约报名成功</span>:<a className={coursestypes===true?"fr user_default_btn task-btn-28BE6C font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn task-btn-28BE6C font-18 pathbtensbox absolutewidth"} onClick={()=>this.putappointment()}>期待开课并预约报名</a>:
|
|
|
|
<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn background191 font-18 pathbtensbox absolutewidth"}>预约报名成功</span>}
|
|
|
|
<span className={coursestypes===true?"fr user_default_btn background191 font-18 pathbtensbox absolutewidth mt5":"fr user_default_btn background191 font-18 pathbtensbox absolutewidth"}>预约报名成功</span>}
|
|
|
|