1
0
forked from dyf/APP

6155部分功能

This commit is contained in:
liub
2025-07-11 16:11:40 +08:00
parent 413c495880
commit cc0ad19e2d
39 changed files with 3823 additions and 13 deletions

View File

@ -20,7 +20,7 @@ let connected = false
//测试
let service_uuid = "0000AE30-0000-1000-8000-00805F9B34FB"
let write_characteristic = "0000AE03-0000-1000-8000-00805F9B34FB"
let write_characteristic = "0000AE03-0000-1000-8000-00805F9B34FB"
let notify_characteristic = "0000AE03-0000-1000-8000-00805F9B34FB"
let notify_characteristic_2 = "0000AE02-0000-1000-8000-00805F9B34FB"//获取设备电量和设备mac地址
@ -123,15 +123,18 @@ String.prototype.transFloat = function() {
return str.indexOf('.') != -1 ? parseFloat(str).toFixed(1) : str
}
// //uni
uni.onBluetoothAdapterStateChange(function(res) {
if (!res.available) {
isOpen = false
isBleOn = false
} else {
isBleOn = true
}
})
//
if (uni.getSystemInfoSync().platform){
uni.onBluetoothAdapterStateChange(function(res) {
if (!res.available) {
isOpen = false
isBleOn = false
} else {
isBleOn = true
}
})
}