# 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
单蓝牙支持