# getLocation ^8.11

获取今日步数。只支持 ios

# 接口调用示例

this.$bridge
  .getTodaySteps()
  .then((res) => {
    console.log('getTodaySteps-res', res)
  })
  .catch((err) => {
    console.log('getTodaySteps-err', err)
  });
1
2
3
4
5
6
7
8

# 返回参数

  • 成功时返回
Prop Type Required Comment
code Number Y 返回码 0-成功,-1000:失败;-4001:设备不支持;-4010:运动与健身未授权;
msg String N 返回信息
steps Number Y 今日步数

# 返回示例


// 成功返回
{
  code: 0,
  msg: '成功',
  steps: 40
}

// 失败返回
{
  code: -4001,
  msg: '设备不支持'
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
更新时间: 9/22/2022, 4:53:06 PM