Browse Source

loca引入

release_0.0.4
‘lijianhao’ 3 years ago
parent
commit
72de58596e
  1. 1
      web/client/index.ejs
  2. 1
      web/client/src/sections/organization/containers/user.js
  3. 15
      web/client/src/sections/quanju/containers/footer/conserve/index.js

1
web/client/index.ejs

@ -15,6 +15,7 @@
} }
</script> </script>
<script src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script> <script src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script>
<script src="https://webapi.amap.com/loca?v=2.0.0&key=00f9a29dedcdbd8befec3dfe0cef5003"></script>
</head> </head>
<body style="background: transparent"> <body style="background: transparent">

1
web/client/src/sections/organization/containers/user.js

@ -374,7 +374,6 @@ const UserManage = (props) => {
function mapStateToProps(state) { function mapStateToProps(state) {
const { depMessage, depUser, global } = state; const { depMessage, depUser, global } = state;
console.log('depMessage:', depMessage);
// console.log(state); // console.log(state);
return { return {
clientHeight: global.clientHeight, clientHeight: global.clientHeight,

15
web/client/src/sections/quanju/containers/footer/conserve/index.js

@ -19,25 +19,24 @@ const Conserve = (props) => {
setLoading(false) setLoading(false)
setRoadData(res.payload.data || {}) setRoadData(res.payload.data || {})
}) })
dispatch(getHighways()).then(res =>{ dispatch(getHighways()).then(res => {
setHighwaysData(res.payload.data || []) setHighwaysData(res.payload.data || [])
}) })
dispatch(getRoadMaintenances()).then(res =>{ dispatch(getRoadMaintenances()).then(res => {
setRoadMaintenances(res.payload.data || []) setRoadMaintenances(res.payload.data || [])
}) })
}, []) }, [])
return ( return (
<div style={{ width: '100%', height: '100%', }}> <div style={{ width: '100%', height: '100%', }}>
<div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}> <div style={{ display: 'flex', width: '100%', height: '100%', justifyContent: 'space-between' }}>
<Left roadData={roadData} loading={loading} /> <Left roadData={roadData} loading={loading} />
<Right highwaysData={highwaysData} roadMaintenances={roadMaintenances}/> <Right highwaysData={highwaysData} roadMaintenances={roadMaintenances} />
</div>
</div> </div>
</div>
) )
} }
function mapStateToProps(state) { function mapStateToProps(state) {
// const { auth } = state; // const { auth } = state;
return { return {

Loading…
Cancel
Save