dev_cs
杨树林 6 years ago
parent 7a23e46d7a
commit f23f5828e8

@ -305,7 +305,7 @@ class CoursesIndex extends Component{
//Do your stuff here //Do your stuff here
}); });
} }
//更新左边课堂导航
updataleftNav=()=>{ updataleftNav=()=>{
let query=this.props.location.pathname let query=this.props.location.pathname
let {isaloadtype}=this.state; let {isaloadtype}=this.state;

@ -29,13 +29,15 @@ class Elearning extends Component{
userlogin:"", userlogin:"",
isRender:false, isRender:false,
subject_id:0, subject_id:0,
myupdataleftNavs:this.myupdataleftNav
} }
} }
componentDidMount() { componentDidMount() {
// 记得删除退出课堂 // 记得删除退出课堂
// console.log("获取到数据"); console.log("在线学习");
// console.log(this.props); console.log("获取到数据");
console.log(this.props);
this.getdata(); this.getdata();
} }
@ -289,6 +291,9 @@ class Elearning extends Component{
}) })
}; };
myupdataleftNav=()=>{
this.props.updataleftNavfun();
}
render(){ render(){
console.log("Elearning++++++++"); console.log("Elearning++++++++");
// console.log(this.props.Chapterupdate); // console.log(this.props.Chapterupdate);
@ -397,7 +402,7 @@ class Elearning extends Component{
<div> <div>
{/*开始学习*/} {/*开始学习*/}
<YslDetailCards {...this.state} {...this.props} Startlearningtwo={()=>this.Startlearningtwo()} Myreload={()=>this.Myreload()} Tojoinclass={()=>this.Tojoinclass()} getPathCardsList={()=>this.getdata()}></YslDetailCards> <YslDetailCards {...this.state} {...this.props} Startlearningtwo={()=>this.Startlearningtwo()} Myreload={()=>this.Myreload()} Tojoinclass={()=>this.Tojoinclass()} getPathCardsList={()=>this.getdata()} ></YslDetailCards>
</div> </div>

@ -210,7 +210,7 @@ class YslDetailCards extends Component{
//取消 //确认
updatapathCardsedit=()=>{ updatapathCardsedit=()=>{
this.setState({ this.setState({
idsum:undefined, idsum:undefined,
@ -219,9 +219,10 @@ class YslDetailCards extends Component{
editbuttomtypeadd:false editbuttomtypeadd:false
}) })
this.props.getPathCardsList(); this.props.getPathCardsList();
this.props.myupdataleftNavs();
// this.props.updatadetailInfoLists(); // this.props.updatadetailInfoLists();
}; };
//确认 //取消
editeditbuttomtypecanle=()=>{ editeditbuttomtypecanle=()=>{
this.setState({ this.setState({
editbuttomtype:true, editbuttomtype:true,
@ -300,6 +301,7 @@ class YslDetailCards extends Component{
this.updatapathCardsedit() this.updatapathCardsedit()
this.props.showNotification(`删除成功`); this.props.showNotification(`删除成功`);
this.props.myupdataleftNavs();
}else { }else {
this.props.showNotification(`删除失败`); this.props.showNotification(`删除失败`);
} }

@ -123,10 +123,11 @@ class DetailCardsEditAndAdd extends Component{
//点击新建阶段 //点击新建阶段
addStage=()=>{ addStage=()=>{
this.props.editeditbuttomtypes();
this.setState({ this.setState({
editPanel:true editPanel:true
}) })
this.props.editeditbuttomtypes();
} }
//取消新建阶段 //取消新建阶段
@ -294,13 +295,12 @@ class DetailCardsEditAndAdd extends Component{
shixun_id:shixuns_listeditlist shixun_id:shixuns_listeditlist
}).then((response) => { }).then((response) => {
// window.location.href = "/paths/" + response.data.subject_id // window.location.href = "/paths/" + response.data.subject_id
this.props.getPathCardsLists();
this.cancelAddState(); this.cancelAddState();
this.setState({ this.setState({
stage_nametype:false, stage_nametype:false,
descriptiontype:false descriptiontype:false
}) })
this.props.getPathCardsLists();
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });

Loading…
Cancel
Save