请扫码查看示例
# blueToothEnable ^7.8
打开蓝牙(只 Android 端支持)
# 请求参数
N/A
# 引入接口模块
import bridge from '@minix-iot/etsbridge-sdk'
1
# 接口调用示例
bridge
.blueToothEnable()
.then((res) => {
console.log(res)
})
.catch((err) => {
console.log(err)
})
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 接口返回示例
this.$bridge.addEventListener('receiveMessageFromApp', (res) => {
console.log('blueToothEnable', JSON.stringify(res))
this.$bridge.showToast({
title: JSON.stringify(res),
duration: 5,
})
})
1
2
3
4
5
6
7
2
3
4
5
6
7
# FAQ
TIP
通过 receiveMessageFromApp 事件返回结果