ソースを参照

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

Damon 7 ヶ月 前
コミット
36230f59f1
1 ファイル変更4 行追加3 行削除
  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) : '';
             res.mac = res.advertisData ? that.buf2hex(res.advertisData) : '';
             // if (that.callBackConnect != null) {
             // if (that.callBackConnect != null) {
             console.log("1111", res.mac);
             console.log("1111", res.mac);
-            if (that.callBackConnect != null && res.mac.includes("D4:D7")) {
+            if (that.callBackConnect != null) {
               that.callBackConnect(res);
               that.callBackConnect(res);
             }
             }
           }
           }
@@ -137,7 +137,7 @@ class bleManager {
             // if (that.callBackConnect != null) {
             // if (that.callBackConnect != null) {
             console.log("3333", res.mac);
             console.log("3333", res.mac);
 
 
-            if (that.callBackConnect != null && res.mac.includes("D4:D7")) {
+            if (that.callBackConnect != null) {
 
 
               that.callBackConnect(res[0]);
               that.callBackConnect(res[0]);
             }
             }
@@ -212,7 +212,7 @@ class bleManager {
                 console.log("搜索到的" + JSON.stringify(temp));
                 console.log("搜索到的" + JSON.stringify(temp));
               }
               }
               // if (that.callBackConnect != null) {
               // 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")) {
                 // if (that.callBackConnect != null && temp.mac.includes("CF:CA")) {
                 that.callBackConnect(temp);
                 that.callBackConnect(temp);
               }
               }
@@ -406,6 +406,7 @@ class bleManager {
     if (strings.isEmpty(deviceId)) {
     if (strings.isEmpty(deviceId)) {
       return;
       return;
     }
     }
+    console.log('断开连接', device);
 
 
     return new Promise((resolve, reject) => {
     return new Promise((resolve, reject) => {
       wx.getConnectedBluetoothDevices({
       wx.getConnectedBluetoothDevices({