Merge pull request 'new-20250827 蓝牙设备添加分享功能' (#31) from liubiao/APP:new-20250827 into main
Reviewed-on: dyf/APP#31
This commit is contained in:
@ -782,31 +782,31 @@ import BleReceive from '@/utils/BleReceive';
|
||||
recei = BleReceive.getBleReceive();
|
||||
//蓝牙连接成功的回调
|
||||
ble.addRecoveryCallback((res) => {
|
||||
console.log("蓝牙连接成功的回调");
|
||||
// console.log("蓝牙连接成功的回调");
|
||||
this.bleRecovery(res);
|
||||
}, pagePath);
|
||||
|
||||
//蓝牙断开连接的回调
|
||||
ble.addDisposeCallback((res) => {
|
||||
console.log("蓝牙断开连接的回调");
|
||||
// console.log("蓝牙断开连接的回调");
|
||||
this.bleBreak(res);
|
||||
}, pagePath);
|
||||
|
||||
//蓝牙适配器恢复可用的回调,一般是重连设备
|
||||
ble.addStateRecoveryCallback(res => {
|
||||
console.log("蓝牙适配器恢复可用的回调");
|
||||
// console.log("蓝牙适配器恢复可用的回调");
|
||||
this.bleStateRecovery();
|
||||
}, pagePath);
|
||||
|
||||
//蓝牙适配器不可用的回调
|
||||
ble.addStateBreakCallback(res => {
|
||||
console.error("蓝牙适配器不可用的回调");
|
||||
// console.error("蓝牙适配器不可用的回调");
|
||||
this.bleStateBreak();
|
||||
}, pagePath);
|
||||
|
||||
//接收到消息的回调
|
||||
ble.addReceiveCallback((receive, device, path, recArr) => {
|
||||
console.error("首页收到消息了");
|
||||
// console.error("首页收到消息了");
|
||||
recei.ReceiveData(receive, device, path, recArr);
|
||||
this.updateBleStatu();
|
||||
}, pagePath);
|
||||
|
||||
Reference in New Issue
Block a user