diff --git a/public/react/src/modules/courses/boards/index.js b/public/react/src/modules/courses/boards/index.js index ea49e862b..9c18313fe 100644 --- a/public/react/src/modules/courses/boards/index.js +++ b/public/react/src/modules/courses/boards/index.js @@ -98,12 +98,12 @@ class Boards extends Component{ this.fetchBoards() this.fetchAll() - on('updateNavSuccess', this.updateNavSuccess) + // on('updateNavSuccess', this.updateNavSuccess) } - componentWillUnmount() { - off('updateNavSuccess', this.updateNavSuccess) - } + // componentWillUnmount() { + // off('updateNavSuccess', this.updateNavSuccess) + // } updateNavSuccess = () => { this.fetchBoards() if (this.props.match.params.boardId == this.state.boardid) { @@ -112,7 +112,7 @@ class Boards extends Component{ } componentDidUpdate = (prevProps) => { - if ( prevProps.match.params.boardId != this.props.match.params.boardId ) { + if ( prevProps.match.params.boardId !== this.props.match.params.boardId ) { this.setState({ isSpin:true }) diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js index ab26787ea..fb0a8a920 100644 --- a/public/react/src/modules/courses/coursesPublic/Addcourses.js +++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js @@ -194,13 +194,11 @@ class Addcourses extends Component{ } submittojoinclass=()=>{ - debugger; let{Addcoursestype}=this.state; this.setState({ isSpin:true }) let {invite_code,professor,assistant_professor,student}=this.state; - invite_code="MBTAP"; if(invite_code===undefined||invite_code===""){ this.setState({ invite_codetype:true, diff --git a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js index 71161bb89..eb0557472 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js @@ -65,7 +65,6 @@ class RepositoryAddFileupload_files extends Component { fileList = fileList.map(file => { if (file.response) { if (file.response.status===0) { - } } return file; @@ -76,34 +75,35 @@ class RepositoryAddFileupload_files extends Component { }; onAttachmentRemove=(info)=>{ + console.log(info); if(info.response){ - let shixunId = this.props.match.params.shixunId; - let {message,filspath}=this.state; - if(message===""||message===undefined){ - this.props.showNotification('删除文件请先填写提交信息'); - return - } + let shixunId = this.props.match.params.shixunId; + let {message,filspath}=this.state; + if(message===""||message===undefined){ + this.props.showNotification('删除文件请先填写提交信息'); + return; + } - let matchpath =this.props.match.path; + let matchpath =this.props.match.path; - let Repositoryflag =undefined; + let Repositoryflag =undefined; - if( matchpath.indexOf("repository")>-1){ - Repositoryflag =undefined; - } - if(matchpath.indexOf("secret_repository")>-1){ - Repositoryflag =true; - } + if( matchpath.indexOf("repository")>-1){ + Repositoryflag =undefined; + } + if(matchpath.indexOf("secret_repository")>-1){ + Repositoryflag =true; + } - let newfilspath=filspath; + let newfilspath=filspath; - if(newfilspath===""){ - newfilspath=info.name - }else{ - newfilspath=filspath+"/"+info.name - } - const url = `/shixuns//${shixunId}/delete_git_file.json`; - axios.delete(url, { data: { + if(newfilspath===""){ + newfilspath=info.name + }else{ + newfilspath=filspath+"/"+info.name + } + const url = `/shixuns//${shixunId}/delete_git_file.json`; + axios.delete(url, { data: { path:newfilspath, message:message, secret_repository:Repositoryflag