fix: use precise location for bind fallback
This commit is contained in:
@@ -52,8 +52,8 @@ export default defineAppConfig({
|
|||||||
},
|
},
|
||||||
permission: {
|
permission: {
|
||||||
"scope.userLocation": {
|
"scope.userLocation": {
|
||||||
desc: "用于定位设备位置",
|
desc: "用于绑定伴伴设备时补充初始位置参考",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
requiredPrivateInfos: ["getFuzzyLocation"],
|
requiredPrivateInfos: ["getLocation"],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -216,8 +216,10 @@ export default function Bind() {
|
|||||||
if (!normalizedDeviceId) return
|
if (!normalizedDeviceId) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const location = await Taro.getFuzzyLocation({
|
const location = await Taro.getLocation({
|
||||||
type: 'gcj02',
|
type: 'gcj02',
|
||||||
|
isHighAccuracy: true,
|
||||||
|
highAccuracyExpireTime: 3000,
|
||||||
})
|
})
|
||||||
await reportBindInitialLocation(normalizedDeviceId, {
|
await reportBindInitialLocation(normalizedDeviceId, {
|
||||||
latitude: location.latitude,
|
latitude: location.latitude,
|
||||||
|
|||||||
Reference in New Issue
Block a user