From 67fbcb823b5b05cf3d13b0a8379e65b0d7e5a99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 20 Dec 2019 22:20:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Challenges/Challengesjupyter.js | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 46647af6f..0f10ee69a 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -276,16 +276,27 @@ class Challengesjupyter extends Component { if(info.file.response.status===0){ try { this.setState({ - jupyter_url : "" + jupyter_url : null, + booljupyterurls:false, }) setTimeout(()=>{ this.setState({ - jupyter_url : this.state.jupyter_url, + jupyter_url : this.state.jupyter_urls, + booljupyterurls:true, }) - },1000) + },1000); this.props.showNotification('上传文件成功!'); }catch (e) { - + this.setState({ + jupyter_url : null, + booljupyterurls:false, + }) + setTimeout(()=>{ + this.setState({ + jupyter_url : this.state.jupyter_urls, + booljupyterurls:true, + }) + },1000); } } @@ -313,7 +324,7 @@ class Challengesjupyter extends Component { const uploadProps = { width: 600, fileList, - multiple: true, + multiple: false, data:{ identifier:id, },