Forráskód Böngészése

Revert "feature:增加MAC地址"

This reverts commit 0b491579078e20cb9edfe56c598df75edf3964da.
zeng.chen 7 hónapja
szülő
commit
bcc8b9751f
1 módosított fájl, 9 hozzáadás és 11 törlés
  1. 9 11
      pages/connectBle/connectBle.js

+ 9 - 11
pages/connectBle/connectBle.js

@@ -26,7 +26,6 @@ Page({
   onLoad(options) {
     var that = this;
     var json = JSON.parse(options.param)
-    json.clientType = "MW-S2(BLE)"
     console.log("要连接设备:", json)
     that.setData({
       connectDevice: json
@@ -41,17 +40,16 @@ Page({
     BtHelper.getInstance().startScan(
       that.data.connectDevice,
       async function (b) {
-        if (!b) {
-          that.setStatus(1);
+          if (!b) {
+            that.setStatus(1);
+          }
+        },
+        async function (res) {
+          await BtHelper.getInstance().stopSearch();
+          that.setStatus(2);
+          that.data.connectDevice.deviceId = res.deviceId;
+          that.data.connectDevice.connectable = res.connectable;
         }
-      },
-      async function (res) {
-        await BtHelper.getInstance().stopSearch();
-        that.setStatus(2);
-        that.data.connectDevice.deviceId = res.deviceId;
-        that.data.connectDevice.connectable = res.connectable;
-        that.data.connectDevice.mac = res.mac;
-      }
     );
   },