diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 2cc5dbafb..1cae3d559 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -49,8 +49,19 @@ class Fileslists extends Component{ this.seactall(parseInt(this.props.match.params.Id),1) } this.updadatalist(); + on('updateNavSuccess', this.updateNavSuccess) } + updateNavSuccess=()=>{ + this.setState({ + isSpin:true + }) + if(this.props.match.params.main_id){ + this.seactall(); + }else if(this.props.match.params.Id){ + this.seactall(parseInt(this.props.match.params.Id),1) + } + } componentDidUpdate = (prevProps) => { if(prevProps.match.params.main_id != this.props.match.params.main_id){ this.setState({ diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index f587697f2..43e44c500 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -55,12 +55,12 @@ class CoursesBanner extends Component { let courseId = this.props.match.params.coursesId; let url = "/courses/" + courseId + "/top_banner.json" axios.get(url).then((result) => { - let data = result.data; - this.setState({ - coursedata: data - }) - // console.log(data) - + if( result!=undefined){ + let data = result.data; + this.setState({ + coursedata: data + }) + } }) } showeditmenu = () => { diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js index f448483d2..bc2fb60b5 100644 --- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js +++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js @@ -200,7 +200,7 @@ class HomeworkModal extends Component{ {this.props.modaltype===undefined||this.props.modaltype===2||this.props.modaltype===4 || !course_groups || course_groups.length == 0 || this.props.usingCheckBeforePost ?"":