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