# getBlueStatus ^5.9.0
获取蓝牙开启状态
# 请求参数
- N/A
# 接口调用示例
this.$bridge
.getBlueStatus()
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 返回参数
通过监听 receiveMessageFromApp 获取
成功时返回
| Prop | Type | Default | Description |
|---|---|---|---|
messageType | String | singleBlueStatus | H5用来判断消息类型 |
messageBody | Object | {}属性: status:{Type: Number, Default: N/A, Description: 表示蓝牙状态( 0蓝牙关闭状态 / 1蓝牙已打开 / 2蓝牙正在重置 / 3设备不支持蓝牙 / 4蓝牙未授权)} | APP传递的JSON对象 |
TIP
该接口基于mSmart 协议,底层由singleBlueToothModule单蓝牙支持