disconnectBlueConnection 断开蓝牙连接

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)
  })

#获取接口返回结果

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

#返回参数

  • 成功时返回
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
  • 失败时返回
posted on 2024-12-21 14:42  AtlasLapetos  阅读(18)  评论(0)    收藏  举报