Browse Source

feat(my_attendance): 更新定位功能使用腾讯坐标系

- 将定位类型从 'wgs84' 改为 'gcj02',以适配腾讯地图坐标系
- 添加 isHighAccuracy 参数,开启高精度定位功能
master
liutong 10 months ago
parent
commit
79e83f7417
  1. 3
      pages/common/my_attendance.vue

3
pages/common/my_attendance.vue

@ -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);

Loading…
Cancel
Save