parent
67879cabf8
commit
ad6df85fed
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1344],{96046:function(y,c,n){n.r(c);var t=n(59301),o=n(76560),f=n(71418),g=n(49661);const E=({})=>{const s=(0,o.useLocation)(),h=(0,t.useRef)(null),[m,p]=(0,t.useState)(!0),[l,v]=(0,t.useState)(""),O="http://localhost:8080",r=(0,o.useSelector)(a=>{var i;return(i=a==null?void 0:a.globalSetting)==null?void 0:i.setting});(0,t.useEffect)(()=>{v(s.pathname+s.search)},[]),(0,t.useEffect)(()=>{const a=i=>{try{const e=JSON.parse(i.data);if(console.log(e,"messageData"),e.type==="ComponentLoaded"){p(!1);const d=window.location.pathname+window.location.search;d!==e.data&&u(d)}e.type==="ChangeThePath"&&o.history.push(e.data),e.type==="OpenThePath"&&(0,g.xg)(e.data),e.type==="BackThePath"&&o.history.back()}catch(e){}};return window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}},[]),(0,t.useEffect)(()=>{l&&u(s.pathname+s.search)},[s.pathname]);const u=a=>{h.current.contentWindow.postMessage(JSON.stringify({type:"ChangeTheRoute",data:a}),"*")};return t.createElement(f.Z,{spinning:m},l&&t.createElement("iframe",{ref:h,style:{border:"none",display:"block",width:"100vw",height:"calc(100vh - 72px)"},src:`${r==null?void 0:r.hami_url}${l}`}))};c.default=E}}]);
|
||||
@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1344],{96046:function(y,l,n){n.r(l);var t=n(59301),o=n(76560),f=n(71418),g=n(49661);const E=({})=>{const s=(0,o.useLocation)(),h=(0,t.useRef)(null),[m,p]=(0,t.useState)(!0),[c,v]=(0,t.useState)(""),r=(0,o.useSelector)(a=>{var i;return(i=a==null?void 0:a.globalSetting)==null?void 0:i.setting});(0,t.useEffect)(()=>{v(s.pathname+s.search)},[]),(0,t.useEffect)(()=>{const a=i=>{try{const e=JSON.parse(i.data);if(console.log(e,"messageData"),e.type==="ComponentLoaded"){p(!1);const d=window.location.pathname+window.location.search;d!==e.data&&u(d)}e.type==="ChangeThePath"&&o.history.push(e.data),e.type==="OpenThePath"&&(0,g.xg)(e.data),e.type==="BackThePath"&&o.history.back()}catch(e){}};return window.addEventListener("message",a),()=>{window.removeEventListener("message",a)}},[]),(0,t.useEffect)(()=>{c&&u(s.pathname+s.search)},[s.pathname]);const u=a=>{h.current.contentWindow.postMessage(JSON.stringify({type:"ChangeTheRoute",data:a}),"*")};return t.createElement(f.Z,{spinning:m},c&&t.createElement("iframe",{ref:h,style:{border:"none",display:"block",width:"100vw",height:"calc(100vh - 72px)"},src:`${r==null?void 0:r.hami_url}${c}`}))};l.default=E}}]);
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue