|
|
|
@ -4,7 +4,9 @@ import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder';
|
|
|
|
|
import './myelearning.css'
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import YslDetailCards from "./YslDetailCards.js";
|
|
|
|
|
import Jointheclass from '../../modals/Jointheclass'
|
|
|
|
|
import Jointheclass from '../../modals/Jointheclass';
|
|
|
|
|
import LoginDialog from "../../login/LoginDialog";
|
|
|
|
|
|
|
|
|
|
//在线学习
|
|
|
|
|
class Elearning extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
@ -23,7 +25,8 @@ class Elearning extends Component{
|
|
|
|
|
shixunsmessage:"",
|
|
|
|
|
startshixunCombattype:false,
|
|
|
|
|
isSpins:false,
|
|
|
|
|
|
|
|
|
|
userlogin:"",
|
|
|
|
|
isRender:false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -58,6 +61,10 @@ class Elearning extends Component{
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
userlogin:this.props.current_user.login,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -68,6 +75,7 @@ class Elearning extends Component{
|
|
|
|
|
};
|
|
|
|
|
//开始学习
|
|
|
|
|
Startlearning=()=>{
|
|
|
|
|
this.Tojoinclass();
|
|
|
|
|
if(this.props.isNotMember()===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
yslJointhe:true
|
|
|
|
@ -206,7 +214,28 @@ class Elearning extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
startshixunCombattypes:false
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
Modifyloginvalue=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
isRender:false,
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
Tojoinclass=()=> {
|
|
|
|
|
let {userlogin} = this.state;
|
|
|
|
|
if (userlogin === undefined) {
|
|
|
|
|
this.setState({
|
|
|
|
|
isRender: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (userlogin === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
isRender: true
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
let{description,whethertoedit,isSpin,start_learning,hidestartshixunsreplacevalues,learned,last_shixun,stages} =this.state;
|
|
|
|
|
const isNotMembers=this.props.isNotMember();//非课堂成员
|
|
|
|
@ -214,6 +243,11 @@ class Elearning extends Component{
|
|
|
|
|
return(
|
|
|
|
|
<React.Fragment >
|
|
|
|
|
<div id={"zhudiv"}>
|
|
|
|
|
{isRender===true?<LoginDialog
|
|
|
|
|
Modifyloginvalue={()=>this.Modifyloginvalue()}
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
/>:""}
|
|
|
|
|
<Jointheclass {...this.props} {...this.state} ysljoinmodalCancel={()=>this.ysljoinmodalCancel()} ysljoinmodalCanceltwo={()=>this.ysljoinmodalCanceltwo()}></Jointheclass>
|
|
|
|
|
<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
@ -317,7 +351,7 @@ class Elearning extends Component{
|
|
|
|
|
</div>:
|
|
|
|
|
<div>
|
|
|
|
|
{/*开始学习*/}
|
|
|
|
|
<YslDetailCards {...this.state} {...this.props} Startlearningtwo={()=>this.Startlearningtwo()} Myreload={()=>this.Myreload()} ></YslDetailCards>
|
|
|
|
|
<YslDetailCards {...this.state} {...this.props} Startlearningtwo={()=>this.Startlearningtwo()} Myreload={()=>this.Myreload()} Tojoinclass={()=>this.Tojoinclass()}></YslDetailCards>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|