From d0153307f8435bbb3e35a5613ce1edc748519e24 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, 30 Jul 2019 23:38:23 +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 --- .../courses/busyWork/CommonWorkDetailIndex.js | 22 +++++++------------ .../exercise/Studentshavecompletedthelist.js | 3 +++ .../exercise/Testpapersettinghomepage.js | 10 +++++++-- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js index 9989de401..b8a5d450c 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkDetailIndex.js @@ -66,6 +66,7 @@ class CommonWorkDetailIndex extends Component{ this.state = { DownloadType:false, DownloadMessageval:undefined, + donwloading:false, } } initWorkDetailCommonState = (data) => { @@ -104,17 +105,11 @@ class CommonWorkDetailIndex extends Component{ } /// 确认是否下载 - confirmysl(url,child){ - let params = {} - if (isListModule) { - // TODO - if(child!=undefined) { - params = child._getRequestParams() !== undefined ? child._getRequestParams() : {}; - } - } - axios.get(url+ '&export=true',{ - params - }).then((response) => { + confirmysl(url){ + axios.get(url+ '&export=true').then((response) => { + if(response===undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ @@ -138,7 +133,6 @@ class CommonWorkDetailIndex extends Component{ this.setState({ donwloading: true }) downloadFile({ url: url, - params, successCallback: (url) => { this.setState({ donwloading: false }) console.log('successCallback') @@ -324,13 +318,13 @@ class CommonWorkDetailIndex extends Component{