From 7f885da98deb9ebf7e0f21260c855ae4d5b65103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 11 Dec 2019 21:01:22 +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 --- .../tpm/shixunchild/Challenges/Challengesjupyter.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index dc70ee1ca..cf7243bf1 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -125,15 +125,21 @@ class Challengesjupyter extends Component { console.log("propsysl"); console.log(propsysl); let id=this.props.match.params.shixunId; + var jupyter_port=""; + try{ + jupyter_port= parseInt(propsysl.shixunsDetails.jupyter_port); + }catch (e) { + jupyter_port=propsysl.shixunsDetails.jupyter_port; + } const url=`/shixuns/${id}/update_jupyter.json`; const data={ identifier:id, - jupyter_port:propsysl.shixunsDetails.jupyter_port + jupyter_port:jupyter_port, } axios.post(url, data) .then((result) => { - if (result.data.status == 0) { + if (result.data.status === 0) { this.props.showNotification(`εΊ”η”¨ζˆεŠŸ`); } }).catch((error) => {