fix:修改蓝牙功能
This commit is contained in:
parent
4dcb8ecf26
commit
2fe3f68e2a
@ -451,7 +451,7 @@
|
|||||||
//获取蓝牙设备某个服务中所有特征值(characteristic)。
|
//获取蓝牙设备某个服务中所有特征值(characteristic)。
|
||||||
uni.getBLEDeviceCharacteristics({
|
uni.getBLEDeviceCharacteristics({
|
||||||
deviceId: blueTooth.value.deviceId,
|
deviceId: blueTooth.value.deviceId,
|
||||||
serviceId: serviceId.value,
|
serviceId: ids.serviceId,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log('获取到' + res.characteristics.length + '个特征值');
|
console.log('获取到' + res.characteristics.length + '个特征值');
|
||||||
console.log('获取特征值:', res.characteristics);
|
console.log('获取特征值:', res.characteristics);
|
||||||
@ -471,12 +471,6 @@
|
|||||||
},
|
},
|
||||||
fail: function () {
|
fail: function () {
|
||||||
console.log('获取特征值失败');
|
console.log('获取特征值失败');
|
||||||
uni.showToast({
|
|
||||||
title: '连接失败,请重启蓝牙',
|
|
||||||
duration: 3000,
|
|
||||||
mask: true,
|
|
||||||
icon: 'none',
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user