From a2bcaa3ded8c452dbe7d35a00dadbd026a1bd778 Mon Sep 17 00:00:00 2001 From: stu2not Date: Tue, 30 Jun 2026 14:21:48 +0800 Subject: [PATCH] Use fuzzy location for bind fallback --- banban-mini/src/app.config.ts | 2 +- banban-mini/src/pages/bind/index.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/banban-mini/src/app.config.ts b/banban-mini/src/app.config.ts index dce7b8b..0e43faa 100644 --- a/banban-mini/src/app.config.ts +++ b/banban-mini/src/app.config.ts @@ -55,5 +55,5 @@ export default defineAppConfig({ desc: "用于定位设备位置", }, }, - requiredPrivateInfos: ["getLocation"], + requiredPrivateInfos: ["getFuzzyLocation"], }); diff --git a/banban-mini/src/pages/bind/index.tsx b/banban-mini/src/pages/bind/index.tsx index c13f9a9..5ac6baa 100644 --- a/banban-mini/src/pages/bind/index.tsx +++ b/banban-mini/src/pages/bind/index.tsx @@ -216,15 +216,13 @@ export default function Bind() { if (!normalizedDeviceId) return try { - const location = await Taro.getLocation({ + const location = await Taro.getFuzzyLocation({ type: 'gcj02', - isHighAccuracy: true, }) await reportBindInitialLocation(normalizedDeviceId, { latitude: location.latitude, longitude: location.longitude, coord_type: 'gcj02', - accuracy_m: typeof location.accuracy === 'number' ? Math.round(location.accuracy) : undefined, }) } catch (error) { console.log('[bind] initial location skipped:', error)