Ver código fonte

Merge branch 'develop/3.2.4' of http://60.205.190.38:9000/zhaoheqing/wxmini into develop/3.2.4

Damon 7 meses atrás
pai
commit
36230f59f1
1 arquivos alterados com 4 adições e 3 exclusões
  1. 4 3
      devices/ble_manager.js

+ 4 - 3
devices/ble_manager.js

@@ -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({