# sendBlueLuaRequest ^6.8

发送Lua请求

# 请求参数

Prop Type Default Comment
name String N/A 蓝牙名称
data Object N/A 数据
mac String N/A 12位蓝牙Mac地址
applianceId String N/A 设备id

# 接口调用示例

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

# 获取接口返回结果

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

# 返回参数

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