# queryDeviceConnectStatus ^5.9.0

获取设备的蓝牙连接状态(只支持weex)

# 请求参数

Prop Type Required Default Description
mac string Y / 12位蓝牙Mac地址
name string Y / 蓝牙名称

# 接口调用示例

let param={
    mac:"xxxx",//12位蓝牙Mac地址
    name:"midea_xx_xxxx",//蓝牙名称
}
this.$bridge
    .queryDeviceConnectStatus(param)
    .then(res => {    
    this.$alert(res)
    })
    .catch(err => {
    this.$toast(err)
    })
1
2
3
4
5
6
7
8
9
10
11
12

# 返回参数

  • 成功时返回
Prop Type Required Default Description
code number Y 0 操作成功
status string Y '0' 连接状态:0:未连接 1:已连接 2:连接中
msg string N 0 返回说明
  • 失败时返回
Prop Type Required Default Description
code number Y -1000 所有错误都是-1000
Last Updated: 3/9/2022, 1:42:52 PM