获取定位
/**引入SDK*/
import QQMapWX from 'qqmap-wx-jssdk.js路径'
data() {
return {
qqMap: new QQMapWX({
key: '腾讯地图申请的key值',
vm: this
}),
}
},
this.qqMap.reverseGeocoder({
let that= this
location: {
latitude:'纬度 latitude',
longitude: '经度 longitude'
},
success: function(res) {
if (res.status == 0) {
let data = res.result.ad_info.city//获取所在城市
}
}
})