- 将定位类型从 'wgs84' 改为 'gcj02',以适配腾讯地图坐标系 - 添加 isHighAccuracy 参数,开启高精度定位功能
@ -643,7 +643,8 @@ export default {
getlocation() {
uni.getLocation({
type: 'wgs84',
type: 'gcj02',//腾讯坐标系
isHighAccuracy: true,//开启高精度定位
success: (res) => {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);