chromesetting
杨树林 5 years ago
parent 964bdf03b3
commit ac0bea6978

@ -89,14 +89,6 @@ export function initAxiosInterceptors(props) {
url = `${config.url}`; url = `${config.url}`;
} }
} }
if(config.params&&config.params.redirect_uri!=undefined){
debugger
if(config.params.redirect_uri.indexOf('jupyters')!=-1){
url = `${config.url}`;
}
}
if(`${config[0]}`!=`true`){ if(`${config[0]}`!=`true`){
if (window.location.port === "3007") { if (window.location.port === "3007") {
// if (url.indexOf('.json') == -1) { // if (url.indexOf('.json') == -1) {

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

Loading…
Cancel
Save