|
@@ -64,7 +64,7 @@ class bleManager {
|
|
|
res.mac = res.advertisData ? that.buf2hex(res.advertisData) : '';
|
|
|
// if (that.callBackConnect != null) {
|
|
|
console.log("1111", res.mac);
|
|
|
- if (that.callBackConnect != null && res.mac.includes("D4:D7")) {
|
|
|
+ if (that.callBackConnect != null) {
|
|
|
that.callBackConnect(res);
|
|
|
}
|
|
|
}
|
|
@@ -137,7 +137,7 @@ class bleManager {
|
|
|
// if (that.callBackConnect != null) {
|
|
|
console.log("3333", res.mac);
|
|
|
|
|
|
- if (that.callBackConnect != null && res.mac.includes("D4:D7")) {
|
|
|
+ if (that.callBackConnect != null) {
|
|
|
|
|
|
that.callBackConnect(res[0]);
|
|
|
}
|
|
@@ -212,7 +212,7 @@ class bleManager {
|
|
|
console.log("搜索到的" + JSON.stringify(temp));
|
|
|
}
|
|
|
// if (that.callBackConnect != null) {
|
|
|
- if (that.callBackConnect != null && temp.mac.includes("D4:D7")) {
|
|
|
+ if (that.callBackConnect != null) {
|
|
|
// if (that.callBackConnect != null && temp.mac.includes("CF:CA")) {
|
|
|
that.callBackConnect(temp);
|
|
|
}
|
|
@@ -406,6 +406,7 @@ class bleManager {
|
|
|
if (strings.isEmpty(deviceId)) {
|
|
|
return;
|
|
|
}
|
|
|
+ console.log('断开连接', device);
|
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
wx.getConnectedBluetoothDevices({
|