|
@@ -0,0 +1,26 @@
|
|
|
+import React,{Component} from 'react';
|
|
|
+import {windowEventHandler,getWindowInnerHeight} from '@utils/tools';
|
|
|
+
|
|
|
+class PushEmbed extends Component{
|
|
|
+ constructor(props){
|
|
|
+ super(props);
|
|
|
+ this.state={
|
|
|
+ height:100,
|
|
|
+ width:'100%'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ componentDidMount() {
|
|
|
+ const height = getWindowInnerHeight() - 190;
|
|
|
+ this.setState({height:height});
|
|
|
+ windowEventHandler('resize', ()=>{
|
|
|
+ const height = getWindowInnerHeight() - 190;
|
|
|
+ this.setState({height:height});
|
|
|
+ });
|
|
|
+ }
|
|
|
+ render(){
|
|
|
+ const {width,height}=this.state;
|
|
|
+ const url = "http://192.168.2.241:5448/index.html?mrId=191218491565001358&tipsMode=2&plan=1&tipsInfoList=%5B%7B%22name%22%3A%22%E8%A1%80%E5%B8%B8%E8%A7%84%22%2C%22type%22%3A12%2C%22position%22%3A%221%22%7D%2C%7B%22name%22%3A%22%E5%B0%BF%E5%B8%B8%E8%A7%84%22%2C%22type%22%3A12%2C%22position%22%3A%221%22%7D%2C%7B%22name%22%3A%22%E7%B3%96%E5%B0%BF%E7%97%85%22%2C%22type%22%3A7%2C%22position%22%3A%221%22%7D%5D";
|
|
|
+ return <iframe id='embedPage' width={width} height={height} src={url} frameborder="0"></iframe>
|
|
|
+ }
|
|
|
+}
|
|
|
+export default PushEmbed;
|