Jelajahi Sumber

引入页面推送模式页面

zhouna 5 tahun lalu
induk
melakukan
a5a67c3a74

+ 3 - 1
src/components/PushContainer/index.jsx

@@ -21,6 +21,7 @@ import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
 import pinyin from '@utils/Convert_Pinyin.js';
 import $ from "jquery";
+import PushEmbed from "../PushEmbed";
 
 class PushContainer extends Component {
   constructor(props) {
@@ -592,7 +593,8 @@ class PushContainer extends Component {
         handleActiveClick={this.handleActiveClick}
       >
         <TemplateContainer activeId={activeId}>
-          <PushItemsContainer></PushItemsContainer>
+          {/*<PushItemsContainer></PushItemsContainer>*/}
+          <PushEmbed></PushEmbed>
           <CaseQuailty></CaseQuailty>
           <TemplateItems
             items={items}

+ 26 - 0
src/components/PushEmbed/index.jsx

@@ -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;

+ 3 - 0
src/components/PushEmbed/index.less

@@ -0,0 +1,3 @@
+iframe{
+  overflow: hidden;
+}