From 2ed0c3c61f73c870b039e71667be1efcfae60fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 17:43: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 --- .../shixunHomework/Listofworksstudentone.js | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 81e388d6f..462ec541f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -997,10 +997,10 @@ class Listofworksstudentone extends Component { if(result === undefined){ return } - if(result.data.message!==undefined){ - - return; - } + // if(result.data.message!==undefined){ + // + // return; + // } this.setState({ teacherdata: result.data, @@ -1059,9 +1059,6 @@ class Listofworksstudentone extends Component { } axios.post(urll, data).then((result) => { if (result) { - if(result.data.message!==undefined){ - return; - } // console.log("学生未截至未公开的作品列表") // console.log(JSON.stringify(result)) this.setState({ @@ -1491,11 +1488,14 @@ class Listofworksstudentone extends Component { let url = "/homework_commons/"+homeworkid+"/update_student_score.json?shixun_id="+teacherdata.shixun_id; axios.get(url).then((response) => { - - this.props.showNotification(`${response.data.message}`); - // var homeworkid = this.props.match.params.homeworkid; - this.Getalistofworks(homeworkid); - this.props.history.replace( matchurl ); + if(response){ + if(response.data.status===0) { + this.props.showNotification(`${response.data.message}`); + // var homeworkid = this.props.match.params.homeworkid; + this.Getalistofworks(homeworkid); + // this.props.history.replace(matchurl); + } + } // this.Getalistofworkstwo("", "", "", "", 1, 20); }).catch((error) => { console.log(error) @@ -2160,15 +2160,17 @@ class Listofworksstudentone extends Component { axios.get(url).then((response) => { if(response){ - if(response.data.message!==undefined){ - return; - } + if(response.data.status===0){ + // if(response.data.message!==undefined){ + // return; + // } this.setState({ loadingstate: true }) - this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit); + this.Getalistofworks(homeworkid); this.props.showNotification(`${response.data.message}`); - this.props.history.replace( matchurl ); + } + // this.props.history.replace( matchurl ); } }).catch((error) => { console.log(error) @@ -2214,9 +2216,6 @@ class Listofworksstudentone extends Component { if(response === undefined){ return } - if(response.data.message!==undefined){ - return; - } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){