From d5b4d6eecf9454042038c3d79f4d449889f6b023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sun, 1 Sep 2019 23:15:35 +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 --- .../react/src/modules/courses/coursesPublic/PathModal.js | 7 +++---- .../react/src/modules/courses/coursesPublic/ShixunModal.js | 6 ++---- .../courses/graduation/tasks/GraduationTasksSubmitnew.js | 2 +- .../react/src/modules/paths/PathDetail/addCollaborators.js | 2 +- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/PathModal.js b/public/react/src/modules/courses/coursesPublic/PathModal.js index a982e3870..9d79899aa 100644 --- a/public/react/src/modules/courses/coursesPublic/PathModal.js +++ b/public/react/src/modules/courses/coursesPublic/PathModal.js @@ -76,7 +76,8 @@ class PathModal extends Component{ shixunpath:true, shixunmodallist:result.data, newshixunmodallist:newshixunmodallists, - hometypepvisible:false + hometypepvisible:false, + page:page }) } @@ -134,9 +135,7 @@ class PathModal extends Component{ let {Searchvalue,type,page,shixunpathlist}=this.state; let newpage=page+1 this.funshixunpathlist(Searchvalue,type,true,newpage) - this.setState({ - page:newpage - }) + } } diff --git a/public/react/src/modules/courses/coursesPublic/ShixunModal.js b/public/react/src/modules/courses/coursesPublic/ShixunModal.js index e5c0edcf8..3a3e20041 100644 --- a/public/react/src/modules/courses/coursesPublic/ShixunModal.js +++ b/public/react/src/modules/courses/coursesPublic/ShixunModal.js @@ -69,7 +69,8 @@ class ShixunModal extends Component{ this.setState({ shixunmodallist: result.data, newshixunmodallist: newshixunmodallists, - hometypepvisible: false + hometypepvisible: false, + page: page }) } @@ -113,9 +114,6 @@ class ShixunModal extends Component{ let {Searchvalue, type, page} = this.state; let newpage = page + 1 this.setupdatalist(Searchvalue, type, true, newpage) - this.setState({ - page: newpage - }) } } } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js index f406f48b1..ed2731c61 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js @@ -235,7 +235,7 @@ class GraduationTasksSubmitnew extends Component{ limit:15 }).then((result)=>{ - if(result.status===200){ + if(result){ if(result.data.status!=403){ if(types===1){ if(result.data.members.length>0){ diff --git a/public/react/src/modules/paths/PathDetail/addCollaborators.js b/public/react/src/modules/paths/PathDetail/addCollaborators.js index 7a31b8775..7323e23d0 100644 --- a/public/react/src/modules/paths/PathDetail/addCollaborators.js +++ b/public/react/src/modules/paths/PathDetail/addCollaborators.js @@ -139,7 +139,7 @@ class addCollaborators extends Component{ let url='/paths/'+id+'/search_members.json?search='+search+"&page="+newpage; axios.post(url).then((result)=>{ - if(result.status==200){ + if(result){ let list=result.data.users; let newlist=partnerList; for(var j=0; j