|
|
@@ -28,7 +28,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 地图 -->
|
|
|
- <atl-map :mapKey="config.mapKey" :mapType="mapType" :marker="marker" :polygons="polygons" :isPolygons="true">
|
|
|
+ <atl-map :mapKey="config.mapKey" :mapType="mapType" :longitude="119.213036" :latitude="25.958812" :marker="marker" :polygons="polygons" :isPolygons="true">
|
|
|
<template v-slot:content>
|
|
|
</template>
|
|
|
</atl-map>
|
|
|
@@ -316,6 +316,7 @@
|
|
|
success: (res) => {
|
|
|
longitude.value = res.longitude; // 保存经度
|
|
|
latitude.value = res.latitude; // 保存纬度
|
|
|
+ $modal.alert('坐标',longitude.value+','+latitude.value)
|
|
|
resolve(); // 解析 Promise
|
|
|
},
|
|
|
fail: (err) => {
|
|
|
@@ -342,9 +343,9 @@
|
|
|
// });
|
|
|
return new Promise((resolve, reject) => {
|
|
|
getlocation()
|
|
|
- .then(() => {
|
|
|
+ .then(res => {
|
|
|
tranLocationToAddress(); // 执行地址转换
|
|
|
- resolve(); // 地址获取成功
|
|
|
+ resolve(res); // 地址获取成功
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// console.error('获取地址失败', err);
|
|
|
@@ -361,7 +362,7 @@
|
|
|
address.value = res.result.address; // 保存地址
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- console('地址转换请求失败', err); // 请求错误处理
|
|
|
+ console.log('地址转换请求失败', err); // 请求错误处理
|
|
|
})
|
|
|
}
|
|
|
|