hejianhao
2026-03-20 c8b467f914864ae15c078fca582fc5cb0753545e
feat: 打开后备箱与解锁车门的getLocation获取高精度位置
2个文件已修改
12 ■■■■■ 已修改文件
src/pages/robotaxi/home/index.less 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/pages/begin-route/components/calling-car.tsx 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/robotaxi/home/index.less
@@ -586,11 +586,11 @@
    .activity-item {
      margin-bottom: 24px;
      border: 2px solid #fff;
      border-radius: 32px;
      border-radius: 24px;
      height: 190px;
      .activity-img {
        border-radius: 32px;
        border-radius: 24px;
        width: 100%;
        height: 100%;
      }
src/robotaxi/pages/begin-route/components/calling-car.tsx
@@ -433,13 +433,17 @@
    // 处理解锁
    const getUnlockLocationPayload = async () => {
        try {
            const location = await Taro.getLocation({ type: 'gcj02' });
            Taro.showLoading({ title: '正在获取位置...', mask: true });
            const location = await Taro.getLocation({ type: 'gcj02', isHighAccuracy: true });
            Taro.hideLoading();
            const longitude = Number(location?.longitude);
            const latitude = Number(location?.latitude);
            if (!Number.isNaN(longitude) && !Number.isNaN(latitude)) {
                return { longitude, latitude };
            }
        } catch (_) { }
        } catch (_) {
            Taro.hideLoading();
        }
        const startSite = Taro.getStorageSync('startSite') || {};
        const longitude = Number(startSite?.longitude);
        const latitude = Number(startSite?.latitude);