# disconnectBlueConnection ^6.8

断开蓝牙连接

# 请求参数

Prop Type Default Comment
mac String N/A 12位蓝牙Mac地址
name String N/A 蓝牙名称

# 接口调用示例

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

# 获取接口返回结果

this.$bridge
  .addEventListener('singleBlueConnectionBreak', res=>console.log(res))
1
2

# 返回参数

  • 成功时返回
Prop Type Default Description
messageBody Object N/A
messageType String N/A singleBlueConnectionBreak
  • messageBody 对象属性
Prop Type Default Description
mac String N/A
name String N/A
  • 失败时返回
更新时间: 7/27/2021, 11:23:45 AM