jiexi(num) {
var that = this
qqmapsdk.reverseGeocoder({
location: {
latitude:that.latitude,
longitude: that.longitude
},
success: function(res) { //成功后的回调
console.log(res,'解析');
let params = {
longitude: that.longitude,
latitude: that.latitude,
location: res.result.address_component.street+res.result.address_reference.landmark_l2.title
}
that.$http.post('punch', params).then(res => {
if (res.err_code == 0) {
that.show = true
setTimeout(()=>{
that.show = false
}, 2000)
}
});
},
fail: function(error) {
console.error(error, '解析fail');
},
complete: function(res) {
console.log(res,'complete');
}
})
},
【小程序位置解析】,经纬度获取具体位置 qqmapsdk.reverseGeocoder
最新推荐文章于 2024-05-12 09:56:32 发布