diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 86e7f2c04..2eb692f58 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -75,6 +75,16 @@ class Challengesjupyter extends Component { }else{ console.log("componentDidMountChallengesjupyter"); console.log(response.data); + if(response.data.status===0){ + this.setState({ + jupyter_url:response.data.url, + jupyter_port:response.data.port, + }) + + + }else{ + + } } } }).catch((error) => { @@ -142,9 +152,9 @@ class Challengesjupyter extends Component { let id=this.props.match.params.shixunId; var jupyter_port=""; try{ - jupyter_port= parseInt(propsysl.shixunsDetails.jupyter_port); + jupyter_port= parseInt(this.state.jupyter_port); }catch (e) { - jupyter_port=propsysl.shixunsDetails.jupyter_port; + jupyter_port=this.state.jupyter_port; } const url=`/shixuns/${id}/update_jupyter.json`; @@ -242,13 +252,22 @@ class Challengesjupyter extends Component { ` } + { + this.props.jupyter_url === null || this.props.jupyter_url === undefined ? + "" + : +
任务详情
示例
应用到实训
任务详情
示例
应用到实训