Commit a0f7a260 authored by 曾婧's avatar 曾婧
parents 70e4a7ee d3abaa37
Pipeline #48600 skipped with stages
This diff is collapsed.
......@@ -3,6 +3,7 @@ import { AMapScene } from '@wisdom-map/Amap';
import { connect } from 'react-redux';
import { store } from '@wisdom-utils/utils';
import { actionCreators } from '../../../containers/App/store';
const AMap = props => {
const getMap = (obj, current) => {
store.set('amapView', {
......@@ -14,10 +15,15 @@ const AMap = props => {
map: current,
});
};
const mapOptions = {
config: props.global.mapsettings,
config: window.globalConfig.mapsettings,
theme: 'amap://styles/74fae00a851749793870b658f9f22d55',
mapOptions: {
plugins: ['AMap.MarkerClusterer'],
},
};
return (
<div
style={{
......@@ -32,9 +38,9 @@ const AMap = props => {
</div>
);
};
const mapStateToProps = state => ({
global: state.getIn(['global', 'globalConfig']),
amapView: state.getIn(['global', 'amapView']),
});
const mapDispatchToProps = dispatch => ({
......
......@@ -21,11 +21,11 @@ const LoginTemplate = {
};
/* eslint-disable */
export default (props) => {
const redirect = getParams('redirect');
useEffect(() => {
if(getParams('loginName') && getParams('password')) return
initGlobalConfig();
}, [redirect]);
// const redirect = getParams('redirect');
// useEffect(() => {
// if(getParams('loginName') && getParams('password')) return
// initGlobalConfig();
// }, [redirect]);
const template = window.globalConfig && window.globalConfig.loginTemplate;
const RenderComponent = LoginTemplate[template] ? LoginTemplate[template]: LoginTemplate['default'];
return <RenderComponent {...props}/>
......
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