修改ios17.0版本My蓝牙搜索不到,J01成人固定体脂模式

This commit is contained in:
qiaocl 2023-09-28 09:22:51 +08:00
parent fc5c8f3ef4
commit d49728a139
37 changed files with 46 additions and 50 deletions

View File

@ -164,8 +164,7 @@
if (!device.name && !device.localName) { if (!device.name && !device.localName) {
return return
} }
if (device.name.indexOf('AiLink_') != -1 || (device.localName && device.localName if (device.name.toLowerCase().indexOf('ailink') != -1 || (device.localName && device.localName.toLowerCase().indexOf('ailink') != -1)) {
.indexOf('AiLink_') != -1)) {
clearTimeout(myTime); clearTimeout(myTime);
let buff = device.advertisData.slice(-6) let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac device.mac = new Uint8Array(buff) // 广maciOSmac
@ -302,9 +301,9 @@
let dw0 = "kg" let dw0 = "kg"
let dw1 = "kg" let dw1 = "kg"
if (bleData.status == 0) { if (bleData.status == 0) {
// let arr = [0x06, 0x01, 0x00] let arr = [0x06, 0x01, 0x00]
// console.log("", arr) console.log("指令发送成功", arr)
// plugin.sendDataOfA7(arr) plugin.sendDataOfA7(arr)
console.log("握手成功") console.log("握手成功")
} else if (bleData.status == 1) { } else if (bleData.status == 1) {
let payload = that.$tools.ab2hex(bleData.data, '') let payload = that.$tools.ab2hex(bleData.data, '')

View File

@ -211,8 +211,7 @@
that.handleDevice(device) that.handleDevice(device)
return; return;
} }
if (device.name.indexOf("AiLink_") !== -1 || (device.localName && device.localName if (device.name.toLowerCase().indexOf('ailink') != -1 || (device.localName && device.localName.toLowerCase().indexOf('ailink') != -1)) {
.indexOf('AiLink_') != -1)) {
clearTimeout(myTime); clearTimeout(myTime);
wx.hideLoading() wx.hideLoading()
let buff = device.advertisData.slice(-6) let buff = device.advertisData.slice(-6)

View File

@ -134,8 +134,7 @@
uni.onBluetoothDeviceFound(res => { uni.onBluetoothDeviceFound(res => {
res.devices.forEach(device => { res.devices.forEach(device => {
device.advertisData = device.advertisData ? device.advertisData : '' device.advertisData = device.advertisData ? device.advertisData : ''
device.advertisServiceUUIDs = device.advertisServiceUUIDs ? device device.advertisServiceUUIDs = device.advertisServiceUUIDs ? device.advertisServiceUUIDs : ""
.advertisServiceUUIDs : ""
if (!device.name && !device.localName) { if (!device.name && !device.localName) {
let value = that.$tools.ab2hex(device.advertisData, "") let value = that.$tools.ab2hex(device.advertisData, "")
let id = value.substring(12, 16) let id = value.substring(12, 16)
@ -159,7 +158,7 @@
} }
return return
} }
if (device.name.indexOf("WSD") != -1) { if (device.name.indexOf("WSD") !== -1) {
clearTimeout(myTime); clearTimeout(myTime);
let buff = device.advertisData.slice(3, 9) let buff = device.advertisData.slice(3, 9)
device.mac = new Uint8Array(buff) // 广maciOSmac device.mac = new Uint8Array(buff) // 广maciOSmac
@ -188,8 +187,7 @@
that.handleDevice(device) that.handleDevice(device)
return; return;
} }
if (device.name.indexOf("AiLink_") != -1 || (device.localName && device.localName if (device.name.toLowerCase().indexOf('ailink') != -1 || (device.localName && device.localName.toLowerCase().indexOf('ailink') != -1)) {
.indexOf('AiLink_') != -1)) {
clearTimeout(myTime); clearTimeout(myTime);
let buff = device.advertisData.slice(-6) let buff = device.advertisData.slice(-6)
device.mac = new Uint8Array(buff) // 广maciOSmac device.mac = new Uint8Array(buff) // 广maciOSmac

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -286,7 +286,7 @@ var _default = {
if (!device.name && !device.localName) { if (!device.name && !device.localName) {
return; return;
} }
if (device.name.indexOf('AiLink_') != -1 || device.localName && device.localName.indexOf('AiLink_') != -1) { if (device.name.toLowerCase().indexOf('ailink') != -1 || device.localName && device.localName.toLowerCase().indexOf('ailink') != -1) {
clearTimeout(myTime); clearTimeout(myTime);
var buff = device.advertisData.slice(-6); var buff = device.advertisData.slice(-6);
device.mac = new Uint8Array(buff); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址 device.mac = new Uint8Array(buff); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址
@ -421,9 +421,9 @@ var _default = {
var dw0 = "kg"; var dw0 = "kg";
var dw1 = "kg"; var dw1 = "kg";
if (bleData.status == 0) { if (bleData.status == 0) {
// let arr = [0x06, 0x01, 0x00] var arr = [0x06, 0x01, 0x00];
// console.log("指令发送成功", arr) console.log("指令发送成功", arr);
// plugin.sendDataOfA7(arr) plugin.sendDataOfA7(arr);
console.log("握手成功"); console.log("握手成功");
} else if (bleData.status == 1) { } else if (bleData.status == 1) {
var payload = that.$tools.ab2hex(bleData.data, ''); var payload = that.$tools.ab2hex(bleData.data, '');

View File

@ -379,7 +379,7 @@ var _default = {
that.handleDevice(device); that.handleDevice(device);
return; return;
} }
if (device.name.indexOf("AiLink_") !== -1 || device.localName && device.localName.indexOf('AiLink_') != -1) { if (device.name.toLowerCase().indexOf('ailink') != -1 || device.localName && device.localName.toLowerCase().indexOf('ailink') != -1) {
clearTimeout(myTime); clearTimeout(myTime);
wx.hideLoading(); wx.hideLoading();
var _buff5 = device.advertisData.slice(-6); var _buff5 = device.advertisData.slice(-6);

View File

@ -302,7 +302,7 @@ var _default = {
} }
return; return;
} }
if (device.name.indexOf("WSD") != -1) { if (device.name.indexOf("WSD") !== -1) {
clearTimeout(myTime); clearTimeout(myTime);
var _buff2 = device.advertisData.slice(3, 9); var _buff2 = device.advertisData.slice(3, 9);
device.mac = new Uint8Array(_buff2); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址 device.mac = new Uint8Array(_buff2); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址
@ -331,7 +331,7 @@ var _default = {
that.handleDevice(device); that.handleDevice(device);
return; return;
} }
if (device.name.indexOf("AiLink_") != -1 || device.localName && device.localName.indexOf('AiLink_') != -1) { if (device.name.toLowerCase().indexOf('ailink') != -1 || device.localName && device.localName.toLowerCase().indexOf('ailink') != -1) {
clearTimeout(myTime); clearTimeout(myTime);
var _buff5 = device.advertisData.slice(-6); var _buff5 = device.advertisData.slice(-6);
device.mac = new Uint8Array(_buff5); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址 device.mac = new Uint8Array(_buff5); // 保存广播数据中的mac地址这是由于iOS不直接返回mac地址