getLocationInfo() {
const that = this;
uni.getLocation({
type: 'gcj02',
success(res) {
console.log('获取定位信息', res);
that.lat = res.latitude;
that.lng = res.longitude;
console.log('当前位置的经度:' + that.lng);
console.log('当前位置的纬度:' + that.lat);
that.getList()
}
});
},
然后去 manifest.json里面