This commit is contained in:
yanran200730
2022-02-10 11:14:18 +08:00
parent 2900c27c70
commit ebcb526f60

View File

@@ -210,14 +210,10 @@ export default {
this.showMap = false
},
getCorpLocation() {
this.instance.post('/app/appdvcpconfig/getCorpLocation').then((res) => {
if (res.code == 0) {
this.initMap(res.data)
}
})
this.initMap()
},
initMap({ lng, lat }) {
initMap() {
AMapLoader.load({
key: 'b553334ba34f7ac3cd09df9bc8b539dc',
version: '2.0',
@@ -228,7 +224,6 @@ export default {
this.map = new AMap.Map('map', {
resizeEnable: true,
zooms: [6, 20],
center: [lng, lat],
zoom: 11,
})
this.placeSearch = new AMap.PlaceSearch({ map: this.map })