diff --git a/src/views/modules/base/community/buildDetail.vue b/src/views/modules/base/community/buildDetail.vue index 1c1292d95..5fcec1356 100644 --- a/src/views/modules/base/community/buildDetail.vue +++ b/src/views/modules/base/community/buildDetail.vue @@ -54,7 +54,7 @@ {{ dataForm.coordinatePosition?dataForm.coordinatePosition:'--' }} -
地图位置:
@@ -151,17 +151,17 @@ export default { latitude = 39.9088810666821; longitude = 116.39743841556731; } + if (this.dataForm.coordinatePosition) { + this.$nextTick(() => { + if (!map) { + this.initMap(latitude, longitude) + } else { + map.setCenter(latitude, longitude); + map.setMarker(latitude, longitude); + } - this.$nextTick(() => { - if (!map) { - this.initMap(latitude, longitude) - } else { - map.setCenter(latitude, longitude); - map.setMarker(latitude, longitude); - } - - }) - + }) + } }, diff --git a/src/views/modules/base/community/buildForm.vue b/src/views/modules/base/community/buildForm.vue index 3ec874e20..271d1b91a 100644 --- a/src/views/modules/base/community/buildForm.vue +++ b/src/views/modules/base/community/buildForm.vue @@ -241,12 +241,14 @@ export default { this.dataForm.latitude = latitude this.dataForm.longitude = longitude } - if (!map) { - this.initMap(this.dataForm.latitude, this.dataForm.longitude); - } else { - map.setCenter(this.dataForm.latitude, this.dataForm.longitude); - map.setMarker(this.dataForm.latitude, this.dataForm.longitude); - } + this.$nextTick(() => { + if (!map) { + this.initMap(this.dataForm.latitude, this.dataForm.longitude); + } else { + map.setCenter(this.dataForm.latitude, this.dataForm.longitude); + map.setMarker(this.dataForm.latitude, this.dataForm.longitude); + } + }) }, async handleComfirm () { diff --git a/src/views/modules/communityParty/regionalParty/activitysDetail.vue b/src/views/modules/communityParty/regionalParty/activitysDetail.vue index 744bb1be6..b15298ed4 100644 --- a/src/views/modules/communityParty/regionalParty/activitysDetail.vue +++ b/src/views/modules/communityParty/regionalParty/activitysDetail.vue @@ -70,6 +70,7 @@