From e43839d72009a5bf6925fbec5954aa0f493f216e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 23 Jul 2019 10:27:59 +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 --- public/react/config/webpack.config.prod.js | 1 + .../courses/shixunHomework/ShixunHomeworkPage.js | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 0abd707af..e1be720a4 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -300,6 +300,7 @@ module.exports = { comments: false }, warnings: false, + drop_console: true, compress: { drop_debugger: false, drop_console: false diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index f15ec9f87..3792f8635 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -59,10 +59,10 @@ class ShixunHomeworkPage extends Component { // console.log(teacherdata); this.setState({ - jobsettingsdatapage: jobsettingsdata, - teacherdatapage: teacherdata, - code_review: teacherdata.code_review, - view_report: teacherdata.view_report, + jobsettingsdatapage: jobsettingsdata.data.message!==undefined?undefined:jobsettingsdata, + teacherdatapage: teacherdata.message!==undefined?undefined:teacherdata, + code_review: teacherdata.code_review!==undefined?teacherdata.code_review :false, + view_report: teacherdata.view_report!==undefined? teacherdata.view_report:false, }) } @@ -116,7 +116,9 @@ class ShixunHomeworkPage extends Component { let {tab, teacherdatapage, jobsettingsdatapage} = this.state; const isAdmin = this.props.isAdmin(); - + // console.log(119) + // console.log(jobsettingsdatapage); + // console.log(teacherdatapage); return (