chromesetting
杨树林 5 years ago
parent 0653c29ab5
commit 9ad11c5deb

@ -5,3 +5,9 @@
$(function(){
console.log("educoder jupyter js init");
})
$(function(){
window.parent.postMessage('jupytermessage','需要发送的消息');
})

@ -10,8 +10,8 @@
// //子目标父窗口接收子窗口发送的消息
// let message = {type: 'open', link:'需要发送的消息'};
// //子窗口向父窗口发送消息,消息中包含我们想跳转的链接
// window.parent.postMessage(message,'需要发送的消息');
//子窗口向父窗口发送消息,消息中包含我们想跳转的链接
window.parent.postMessage('jupytermessage','需要发送的消息');
@ -26,4 +26,3 @@
// }
// },false);

@ -229,6 +229,8 @@ class Challengesjupyter extends Component {
const business = this.props&&this.props.current_user&&this.props.current_user.business?this.props.current_user.business:false;
//管理员
const admin = this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false;
//用户
const login = this.props&&this.props.current_user&&this.props.current_user.login?this.props.current_user.login:"";
let mysidentity =false;
try {
@ -409,10 +411,19 @@ class Challengesjupyter extends Component {
:""
)
:
<iframe src={this.state.jupyter_url} className={enlarge?"fangdatwo":""}
sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame"
name="framename" width="100%" height="700" frameBorder="0"
></iframe>
(
login==="innov"?
<iframe src={"http://121.41.4.83:46666/notebooks/root/work/01.ipynb"} className={enlarge?"fangdatwo":""}
sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame"
name="framename" width="100%" height="700" frameBorder="0"
></iframe>
:
<iframe src={this.state.jupyter_url} className={enlarge?"fangdatwo":""}
sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame"
name="framename" width="100%" height="700" frameBorder="0"
></iframe>
)
}
</div>
</div>

Loading…
Cancel
Save