|
@@ -8,7 +8,8 @@ class PushEmbed extends Component{
|
|
|
super(props);
|
|
|
this.state={
|
|
|
height:100,
|
|
|
- width:'100%'
|
|
|
+ width:'100%',
|
|
|
+ hashNum:0
|
|
|
}
|
|
|
}
|
|
|
componentDidMount() {
|
|
@@ -21,14 +22,15 @@ class PushEmbed extends Component{
|
|
|
}
|
|
|
componentWillReceiveProps(next){
|
|
|
if(next.update!=this.props.update){
|
|
|
- //window.frames['embedPage'].contentWindow.location.reload();
|
|
|
- //console.log(window.frames['embedPage'].contentWindow)
|
|
|
+ this.setState({
|
|
|
+ hashNum:Math.random()
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
render(){
|
|
|
- const {width,height}=this.state;
|
|
|
+ const {width,height,hashNum}=this.state;
|
|
|
const {mrId} = this.props;
|
|
|
- const url = "http://192.168.2.241:5448/index.html?mrId="+mrId+"&plan=1";
|
|
|
+ const url = "http://192.168.2.241:5448/index.html?mrId="+mrId+"&plan=1&data="+hashNum;
|
|
|
return <iframe id='embedPage' width={width} height={height} src={url} frameborder="0"></iframe>;
|
|
|
}
|
|
|
}
|