res判断
This commit is contained in:
@@ -97,9 +97,8 @@ export default {
|
|||||||
type: 'wgs84', // 返回可以用于uni.openLocation的经纬度,默认为wgs84的gps坐标
|
type: 'wgs84', // 返回可以用于uni.openLocation的经纬度,默认为wgs84的gps坐标
|
||||||
success : (res) => {
|
success : (res) => {
|
||||||
let location = `${res.latitude}, ${res.longitude}`
|
let location = `${res.latitude}, ${res.longitude}`
|
||||||
console.log(location)
|
|
||||||
this.$instance.post(`/admin/area/reverseGeocoding?location=${location}`).then(res => {
|
this.$instance.post(`/admin/area/reverseGeocoding?location=${location}`).then(res => {
|
||||||
if(res.code == 0) {
|
if(res && res.code == 0){
|
||||||
this.areaId = res.data.result.addressComponent.adcode + '000000'
|
this.areaId = res.data.result.addressComponent.adcode + '000000'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user