336
This commit is contained in:
@@ -161,6 +161,8 @@ export default {
|
||||
lat: '',
|
||||
address: ''
|
||||
},
|
||||
lng: '',
|
||||
lat: '',
|
||||
showMap: false,
|
||||
searchPlace: '',
|
||||
timeOption: {
|
||||
@@ -198,6 +200,18 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res => {
|
||||
if (res.code == 0) {
|
||||
this.lng = res.data.lng
|
||||
this.lat = res.data.lat
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
selectMap() {
|
||||
this.form.lng = this.placeDetail.lng
|
||||
@@ -214,7 +228,7 @@ export default {
|
||||
this.map = new AMap.Map('map', {
|
||||
resizeEnable: true,
|
||||
zooms: [6, 20],
|
||||
center:[107.73,29.86],
|
||||
center:[this.lng, this.lat],
|
||||
zoom: 11,
|
||||
})
|
||||
this.placeSearch = new AMap.PlaceSearch({ map: this.map })
|
||||
@@ -271,7 +285,6 @@ export default {
|
||||
this.mapDetail = new AMap.Map(document.getElementById("mapDetail"), {
|
||||
resizeEnable: true,
|
||||
zooms: [6, 20],
|
||||
center:[104.067923463,30.6799428454],
|
||||
zoom: 11,
|
||||
})
|
||||
let marker = new AMap.Marker({
|
||||
|
||||
Reference in New Issue
Block a user