Переглянути джерело

feature: 2AXD搜索处理

332777428@qq.com 4 місяців тому
батько
коміт
17ea842d1c
1 змінених файлів з 12 додано та 10 видалено
  1. 12 10
      pages/deviceConnect2/deviceConnect2.js

+ 12 - 10
pages/deviceConnect2/deviceConnect2.js

@@ -201,6 +201,18 @@ Page({
       return;
     };
 
+
+    if (that.data.isSubmit) {
+      return;
+    };
+
+    that.data.isSubmit = true;
+
+    // 停止搜索
+    xBlufi.notifyStartDiscoverBle({
+      'isStart': false,
+    });
+
     var name = devicesList[0].name;
     var deviceId = devicesList[0].deviceId;
     var isJungzheng1 = junzheng_util.isJungzheng1(name);
@@ -213,16 +225,6 @@ Page({
       return;
     }
 
-    if (that.data.isSubmit) {
-      return;
-    };
-    that.data.isSubmit = true;
-
-    // 停止搜索
-    xBlufi.notifyStartDiscoverBle({
-      'isStart': false,
-    });
-
     //开始连接
     var name = devicesList[0].name;
     // console.log('点击了,蓝牙准备连接的deviceId:' + devicesList[0].deviceId)