From 975368af0090ed3a67c9bc738dbf923acf7a690a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 8 Jul 2019 09:03:26 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/EducoderLogin.js | 2 +- public/react/src/modules/user/Interestpage.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 787acedce..b46435fe7 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -116,9 +116,9 @@ class EducoderLogin extends Component { }) } else if(e===2) { this.setState({ - showbool: 2, namezh:name, passmm:pass, + showbool: 2, }) }else if(e===3){ this.setState({ diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js index 97a52bae9..77397fbc6 100644 --- a/public/react/src/modules/user/Interestpage.js +++ b/public/react/src/modules/user/Interestpage.js @@ -122,7 +122,8 @@ class InterestpageComponent extends Component { interest_ids: ints, }).then((response) => { if (response !== undefined) { - this.Jumptotheinterestpage(); + // this.Jumptotheinterestpage(); + window.location.href = "/" } From 3f762340108e7ee282d95604431b264c525e820b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 8 Jul 2019 09:25:56 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/tpm/shixuns/ShixunSearchBar.js | 58 ++++++++++++++----- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js index b05732e31..f9f56a90d 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js +++ b/public/react/src/modules/tpm/shixuns/ShixunSearchBar.js @@ -25,7 +25,7 @@ class ShixunSearchBar extends Component { super(props) this.state = { status: undefined, - diff: undefined, + diff: 0, InputValue: undefined, shixunhoverData: [], shixunchildValues:'', @@ -238,6 +238,7 @@ render() {
{teacherdata === undefined ? "" : teacherdata.homework_name}
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 4e9cb3e00..cb1e8b642 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -294,28 +294,32 @@ class Listofworksstudentone extends Component { course_group: "", } axios.post(urll, data).then((result) => { - if (result.status === 200) { - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - course_group_info: result.data.course_group_info, - student_works: result.data.student_works, - jobsettingsdata: result, - publish_immediately: result.data.publish_immediately, - end_immediately: result.data.end_immediately, - id: result.data.id, - work_efficiency: result.data.work_efficiency, - code_review: result.data.code_review, - challenges_count:result.data.challenges_count, - view_report:result.data.view_report, - }) - if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { - this.seacthdata(result.data); - } else { - this.seacthdatas(result.data,result.data.student_works); - } + if (result.status === 200) { + if(this.props.isNotMember()===false) { + this.setState({ + teacherdata: result.data, + task_status: result.data.task_status, + course_group_info: result.data.course_group_info, + student_works: result.data.student_works, + jobsettingsdata: result, + publish_immediately: result.data.publish_immediately, + end_immediately: result.data.end_immediately, + id: result.data.id, + work_efficiency: result.data.work_efficiency, + code_review: result.data.code_review, + challenges_count: result.data.challenges_count, + view_report: result.data.view_report, + }) + if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { + this.seacthdata(result.data); + } else { + this.seacthdatas(result.data, result.data.student_works); + } + + } } + }).catch((error) => { console.log(error) }) @@ -703,6 +707,7 @@ class Listofworksstudentone extends Component { if (result !== undefined) { // console.log("学生公开的作品列表") // console.log(JSON.stringify(result)) + if(this.props.isNotMember()===false) { this.setState({ teacherdata: result.data, task_status: result.data.task_status, @@ -719,6 +724,7 @@ class Listofworksstudentone extends Component { }) this.seacthdata(result.data); } + } }).catch((error) => { console.log(error) this.setState({ diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 2d2babb09..93b9fa009 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -609,8 +609,8 @@ class ShixunStudentWork extends Component { typs={this.state.typs} />+
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 1ff1c1170..4532d92f9 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1711,7 +1711,7 @@ class Trainingjobsetting extends Component { modalSave={modalSave} >
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index a02ec50e7..b0cbb82d7 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -400,7 +400,7 @@ class Workquestionandanswer extends Component { typs={this.state.typs} />
{jobsettingsdata === undefined ? "" : jobsettingsdata.data.homework_name}
diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 1275cf4a0..c6a5e3076 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -317,7 +317,9 @@ class LoginDialog extends Component { }); } handleDialogClose = () => { - if(this.props.match.path==="/"){ + if(this.props.match===undefined){ + window.location.href="/"; + }else if(this.props.match.path==="/"){ this.setState({ isRender: false })