杨树林 5 years ago
parent 16369e85f8
commit d83b768ef2

@ -61,18 +61,18 @@ class Elearning extends Component{
})
});
this.setState({
userlogin:this.props.current_user.login,
})
}
componentDidUpdate = (prevProps) => {
if(prevProps.current_user!=this.props.current_user){
if(this.props.current_user!==undefined){
this.setState({
userlogin :this.props.current_user.login,
})
}
}
}
};
//开始学习
Startlearning=()=>{
let {userlogin} = this.state;
@ -125,7 +125,6 @@ class Elearning extends Component{
console.log("精品课堂开发学习");
console.log(response);
// console.log(JSON.stringify(response));
debugger
if (response.data.status === -2) {
this.setState({

Loading…
Cancel
Save