# getCachedLocationByHomegroupId

通过缓存获取经纬度,查询对应的城市信息。如未授权则返回空值,不会主动调起手机授权弹窗

# 请求参数

Prop Type Required Default Description
homegroupId String Y - 家庭ID

# 参数代码示例

// 通过家庭ID获取缓存的位置信息
this.$bridge.getCachedLocationByHomegroupId({
    homegroupId: 'xxx'
}).then(res => {
    // res 包含 lat(纬度), lon(经度)
    console.log(res.lat, res.lon)
})
1
2
3
4
5
6
7

# 返回参数

  • 返回 lat(纬度)、lon(经度)