You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
3.3 KiB
1 line
3.3 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[45950],{77318:function(e,t,o){o.r(t);var n=o(18698),a=o.n(n),r=o(42122),i=o.n(r),c=o(27424),s=o.n(c),l=o(67294),u=o(88275),d=o(91773),g=o(85893);t.default=(0,u.connect)((function(e){var t=e.user,o=e.loading,n=e.globalSetting,a=e.coreCurriculum;return{user:t,loading:o.effects,globalSetting:n,coreCurriculum:a}}))((function(e){var t,o=e.coreCurriculum,n=e.dispatch,r=(e.loading,e.user,e.globalSetting),c=(o.CoreSubjects,d.Z.useForm()),u=(s()(c,1)[0],(0,l.useState)(!1)),p=s()(u,2),m=(p[0],p[1],(0,l.useState)("")),h=s()(m,2),f=h[0],y=(h[1],(0,l.useState)({page:1,limit:12})),v=s()(y,2),w=v[0];v[1];(0,l.useEffect)((function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i()(i()({},w),{},{keyword:f});n({type:"coreCurriculum/getCoreSubjects",payload:i()({},e)})}()}),[w]),(0,l.useEffect)((function(){return n({type:"globalSetting/footerToggle",payload:!1}),function(){n({type:"globalSetting/footerToggle",payload:!0})}}),[]);var S=(0,l.useRef)(null),b=["systemEditMap","knowledgeRelation","referencedList","contentSource","teachingOperating","commonMapDetailForce","graphFullScreen","questionSystem","courseEdit","addAndEditProblem","mapSourceFullScreen"];return(0,l.useEffect)((function(){!function(){console.log("updateIframeSrc 触发");var e=new URLSearchParams(window.location.search),t=e.get("courseId"),o=e.get("path"),n=e.get("tab"),a=e.get("nodeUid"),r=e.get("graphType"),i=S.current;if(i&&i.src){var c=new URL(i.src),s=o?decodeURIComponent(o):"";if(console.log("decodedPath:",s),s){var l=s.split("/")[0];b.includes(l)?(console.log("includes"),c.pathname="/ai-sys-chemistry-h5/".concat(l,"/").concat(t)):(console.log("默认路径"),c.pathname="/ai-sys-chemistry-h5/".concat(s))}t&&c.searchParams.set("mapUid",t),n&&c.searchParams.set("tab",n),a&&c.searchParams.set("nodeUid",a),r&&c.searchParams.set("graphType",r),i.src!==c.toString()?(i.src=c.toString(),console.log("iframe.src 更新为:",i.src)):console.log("iframe.src 无变化,不刷新")}}();var e=function(e){var t=e.data;if(e.source===S.current.contentWindow&&"string"==typeof t)try{var o=JSON.parse(t);if("object"===a()(o)){var n=o.courseId,r=o.type,i=o.nodeUid,c=o.path,s=o.tab,l=o.graphType,u=new URLSearchParams;n&&u.set("courseId",n),r&&u.set("type",r),s&&u.set("tab",s),i&&u.set("nodeUid",i),c&&u.set("path",c),l&&u.set("graphType",l);var d="?"+u.toString();window.location.search!==d&&(console.log("更新地址栏:",d),window.history.replaceState({},"",window.location.pathname+d))}}catch(e){console.error("解析消息数据出错:",e)}};return window.addEventListener("message",e),function(){window.removeEventListener("message",e)}}),[]),(0,g.jsx)("section",{children:(0,g.jsx)("iframe",{src:null==r||null===(t=r.setting)||void 0===t?void 0:t.core_subject_url,ref:S,id:"myIframe",style:{position:"absolute",top:"70px",left:0,width:"100%",height:"calc(-70px + 100vh)",border:0}})})}))},33507:function(e,t){t.Z=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}})}}]); |