From 777736d47f020a373424db1234c7092d906aa39f 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, 13 Aug 2019 17:26:55 +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/ShixunStudentWork.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 1041bb284..299090a22 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -153,19 +153,16 @@ class ShixunStudentWork extends Component { } this.setState({ data: response.data, - datalist:datas + datalist:datas, + lunxun:false, }); + }else { + setInterval(() => { + if(this.state.lunxun===true){ + this.getupdata(); + } + }, 5000); } - this.setState({ - lunxun:false, - }) - }else{ - setInterval(() => { - if(this.state.lunxun===true){ - this.getupdata(); - } - }, 1000); - } }