|
|
|
@ -69,12 +69,13 @@ class Challengesjupyter extends Component {
|
|
|
|
|
identifier:id,
|
|
|
|
|
}
|
|
|
|
|
axios.get(ChallengesURL, {params: datas}).then((response) => {
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
debugger
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
// console.log("componentDidMountChallengesjupyter");
|
|
|
|
|
// console.log(response.data);
|
|
|
|
|
debugger
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
this.setState({
|
|
|
|
|
jupyter_url:response.data.url,
|
|
|
|
@ -86,7 +87,6 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
@ -146,7 +146,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
modifyjupyter=(propsysl)=>{
|
|
|
|
|
modifyjupyter=()=>{
|
|
|
|
|
// console.log("propsysl");
|
|
|
|
|
// console.log(propsysl);
|
|
|
|
|
let id=this.props.match.params.shixunId;
|
|
|
|
@ -253,7 +253,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
{
|
|
|
|
|
this.props.jupyter_url === null || this.props.jupyter_url === undefined ?
|
|
|
|
|
this.state.jupyter_url === null || this.state.jupyter_url === undefined ?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<div className="sortinxdirection mt60">
|
|
|
|
@ -262,7 +262,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
<div><p className="renwuxiangqdivtest ml24">(请将实训题目写在下方)</p></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="renwuxiangssit xaxisreverseorder">
|
|
|
|
|
<div className="challenbaocun" onClick={() => this.modifyjupyter(this.props)}><p
|
|
|
|
|
<div className="challenbaocun" onClick={() => this.modifyjupyter(this.state)}><p
|
|
|
|
|
className="challenbaocuntest">应用到实训</p></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -294,10 +294,10 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
<div className="pb47">
|
|
|
|
|
{
|
|
|
|
|
this.props.jupyter_url===null || this.props.jupyter_url===undefined?
|
|
|
|
|
this.state.jupyter_url===null || this.state.jupyter_url===undefined?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<iframe src={this.props.jupyter_url}
|
|
|
|
|
<iframe src={this.state.jupyter_url}
|
|
|
|
|
sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame"
|
|
|
|
|
name="framename" width="100%" height="700" frameBorder="0"
|
|
|
|
|
></iframe>
|
|
|
|
|