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=()=>{ 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){ if(this.props.isNotMember()===true){
this.setState({ this.setState({
yslJointhe:true yslJointhe:true
@ -221,20 +233,10 @@ class Elearning extends Component{
}) })
}; };
Tojoinclass=()=> { Tojoinclass=()=> {
let {userlogin} = this.state;
if (userlogin === undefined) {
this.setState({
isRender: true
})
return
}
if (userlogin === "") {
this.setState({ this.setState({
isRender: true isRender: true
}) })
return; };
}
}
render(){ render(){
let{description,whethertoedit,isSpin,start_learning,hidestartshixunsreplacevalues,learned,last_shixun,stages,isRender} =this.state; let{description,whethertoedit,isSpin,start_learning,hidestartshixunsreplacevalues,learned,last_shixun,stages,isRender} =this.state;

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

Loading…
Cancel
Save