Merge branches 'dev_Ysm' and 'dev_admin' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl

# Conflicts:
#	app/controllers/application_controller.rb
dev_hs
杨树林 6 years ago
parent e3a9065161
commit 38e307487a

@ -75,7 +75,19 @@ class Elearning extends Component{
};
//开始学习
Startlearning=()=>{
this.Tojoinclass();
let {userlogin} = this.state;
if (userlogin === undefined) {
this.setState({
isRender: true
})
return
}
if (userlogin === "") {
this.setState({
isRender: true
})
return;
}
if(this.props.isNotMember()===true){
this.setState({
yslJointhe:true
@ -221,20 +233,10 @@ class Elearning extends Component{
})
};
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,isRender} =this.state;

@ -34,13 +34,30 @@ class YslDetailCards extends Component{
};
startgameid=(id)=>{
// 上面传过来的方法是用来没登入弹出弹框的
try {
let {userlogin} = this.props;
if (userlogin === undefined) {
this.props.Tojoinclass();
return
}
if (userlogin === "") {
this.props.Tojoinclass();
return;
}
}catch (e) {
}
try {
if(this.props.isNotMember()===true){
//这个是外部传过来的
this.props.Startlearningtwo();
return
}
}catch (e) {
}
let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => {

Loading…
Cancel
Save