
joywayerandClaude Opus 4.7
d48ecc0473
Design §8.6:新增 LocationKit + 2 项接口实现骨架
覆盖 §3.1 [20]startlocation + §3.2 [6]getlocationinfo 反向 callback。
§8.6.1 LocationService module 骨架:
- AMapServices.bootstrap:privacy + key 启动期完成
- locateOnce() async/await 包装 AMapLocationManager.requestLocation
- startContinuous / stopContinuous + onContinuousUpdate 闭包钩子
- LocationInfo struct 转契约 §3.2 表 B 9 字段(latitude/longitude string
化用 String(format: "%f"),province 小写 p)
- LocationError.permissionDenied(code: 12)
§8.6.2 H5 handler(LocationHandlers.startLocation):
- 入参 data: int 1=持续 / 其他=一次性,与 msext RootVC 沿用
- 持续模式:onContinuousUpdate 挂钩 → 每次位置变化推 getlocationinfo
- 一次性:await locateOnce → 单次推
- responseCallback: "startlocation"
- 失败 callback 数据结构 errorCode 数字 12 不是 string(契约硬约束)
§8.6.3 与 msext 6 维度差异表(SDK 接入 / 隐私合规集中 / async wrapper /
入参解析 / latitude string / province 小写 p)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-22 07:30:06 +08:00
..
2026-06-21 22:32:38 +08:00
2026-06-22 04:23:52 +08:00
2026-06-21 19:39:22 +08:00
2026-06-22 07:30:06 +08:00