Commit be0ff1a6 authored by 邹绪超's avatar 邹绪超

fix: 修复加载三维地图失败

parent 7ef05321
Pipeline #73984 passed with stages
...@@ -6,7 +6,7 @@ import classNames from 'classnames'; ...@@ -6,7 +6,7 @@ import classNames from 'classnames';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import _ from 'lodash'; import _ from 'lodash';
import memoized from 'nano-memoize'; import memoized from 'nano-memoize';
import KeepAlive from 'react-activation'; import KeepAlive , {AliveScope} from 'react-activation';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { matchRoutes } from 'react-router-dom'; import { matchRoutes } from 'react-router-dom';
import RightContent from '@/components/GlobalHeader/SimpleRiightContent'; import RightContent from '@/components/GlobalHeader/SimpleRiightContent';
...@@ -499,13 +499,15 @@ const Layout = props => { ...@@ -499,13 +499,15 @@ const Layout = props => {
{/* <ArcgisMap options={{ type: 'ArcgisMap' }} /> */} {/* <ArcgisMap options={{ type: 'ArcgisMap' }} /> */}
{/* ) */} {/* ) */}
{/* ) : null} */} {/* ) : null} */}
<AliveScope>
{window.location.pathname.startsWith('/civbase/civ_3d/map') || isHaveMap() ? ( {window.location.pathname.startsWith('/civbase/civ_3d/map') || isHaveMap() ? (
<KeepAlive> <KeepAlive when={true}>
<CesiumMap /> <CesiumMap />
</KeepAlive> </KeepAlive>
) : ( ) : (
window.location.pathname.startsWith('/civbase/civ_webgis') && null window.location.pathname.startsWith('/civbase/civ_webgis') && null
)} )}
</AliveScope>
</Suspense> </Suspense>
<div id="micro-container" className="subapp-container"> <div id="micro-container" className="subapp-container">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment