Commit 0bedc6a0 authored by 邓晓峰's avatar 邓晓峰

feat: 添加地图初始化监听

parent f564f88f
Pipeline #47230 skipped with stages
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
// }, // },
{ {
name: 'civ_webgis', name: 'civ_webgis',
entry: `//${window.location.hostname}:8080/civ_webgis`, entry: `//${window.location.hostname}:8081/civ_webgis`,
container: '#micro-container', container: '#micro-container',
activeRule: '/civbase/civ_webgis', activeRule: '/civbase/civ_webgis',
}, },
......
...@@ -3,6 +3,7 @@ import { initGlobalState } from 'qiankun'; ...@@ -3,6 +3,7 @@ import { initGlobalState } from 'qiankun';
export const initialState = { export const initialState = {
globalConfig: {}, globalConfig: {},
view: ""
}; };
const actions = initGlobalState(initialState); const actions = initGlobalState(initialState);
......
...@@ -125,7 +125,7 @@ export const initMicroApps = () => { ...@@ -125,7 +125,7 @@ export const initMicroApps = () => {
// globalConfig.homepage = globalConfig.homepage && /civweb4/.test(globalConfig.homepage) ? config.homepage.replace(/civweb4\//, ''): globalConfig.homepage; // globalConfig.homepage = globalConfig.homepage && /civweb4/.test(globalConfig.homepage) ? config.homepage.replace(/civweb4\//, ''): globalConfig.homepage;
actions.setGlobalState({ actions.setGlobalState({
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
globalConfig: globalConfig, globalConfig: globalConfig
//createStoreage.get('globalConfig'), //createStoreage.get('globalConfig'),
}); });
......
...@@ -4,7 +4,7 @@ import { connect } from 'react-redux'; ...@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import MapComponent from '@/components/mapView'; import MapComponent from '@/components/mapView';
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import { store } from 'microser-data';
class CreateMap extends React.Component { class CreateMap extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -18,6 +18,7 @@ class CreateMap extends React.Component { ...@@ -18,6 +18,7 @@ class CreateMap extends React.Component {
getView = view => { getView = view => {
store.set('view', view);
this.props.updageMapView(view); this.props.updageMapView(view);
}; };
......
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