From 673fb3f0bd8b8740c98a21e79b1b8eb6ea06b822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 10 Aug 2019 14:59:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/paths/PathDetail/sendPanel.js | 46 +++++++++++++------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/sendPanel.js b/public/react/src/modules/paths/PathDetail/sendPanel.js index 2f9059a18..ae7dd5b00 100644 --- a/public/react/src/modules/paths/PathDetail/sendPanel.js +++ b/public/react/src/modules/paths/PathDetail/sendPanel.js @@ -27,9 +27,27 @@ class sendPanel extends Component{ //发送至 SentToLesson =() =>{ - this.setState({ - sentShixunPath:true - }) + let id=this.props.detailInfoList.id; + let url="/paths/"+id+"/choose_course.json"; + axios.get(url).then((result)=>{ + if(result.status==200){ + + if (result.data.status === 403||result.data.status === 402||result.data.status === 407||result.data.status === 408) { + + }else{ + this.setState({ + sendToCourseList:result.data, + sentShixunPath:true + }) + } + + } + }).catch((error)=>{ + console.log(error); + }) + // this.setState({ + // sentShixunPath:true + // }) } //隐藏发送至弹框 hideSenttothevalue =()=>{ @@ -99,17 +117,17 @@ class sendPanel extends Component{ } componentDidMount(){ - let id=this.props.detailInfoList.id; - let url="/paths/"+id+"/choose_course.json"; - axios.get(url).then((result)=>{ - if(result.status==200){ - this.setState({ - sendToCourseList:result.data - }) - } - }).catch((error)=>{ - console.log(error); - }) + // let id=this.props.detailInfoList.id; + // let url="/paths/"+id+"/choose_course.json"; + // axios.get(url).then((result)=>{ + // if(result.status==200){ + // this.setState({ + // sendToCourseList:result.data + // }) + // } + // }).catch((error)=>{ + // console.log(error); + // }) } cardsModalcancel=()=>{