# startGyroscope ^6.8

陀螺仪监听

# 请求参数

  • N/A

# 接口调用示例


    this.$bridge
    .startGyroscope()
    .then(res => {    
        this.$alert(res)
    })
    .catch(err => {
        this.$toast(err)
    })

1
2
3
4
5
6
7
8
9
10

# 返回参数

  • 成功时返回
Prop Type Comment
code Number 0
x Number x 轴的角速度
y Number y 轴的角速度
z Number z 轴的角速度
  • 失败时返回(api为空或者没有)
Prop Type Value
code Number -1
msg String 失败
Prop Type Value
code Number -8
msg String 不支持

# 返回示例


{
    "code": 0,
    "x": 0.2082139253616333,
    "y": 0.107050821185112,
    "z": 0.04517493396997452
}

1
2
3
4
5
6
7
8
更新时间: 7/27/2021, 11:23:45 AM