Explorar o código

feature: WiFi连接X2和蓝牙连接并选中黑胶音箱时,其他手机WiFi连接X2后,当前小程序X2设备会自选中

332777428@qq.com hai 5 meses
pai
achega
c34e877019
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      utils/lexin/message.js

+ 5 - 2
utils/lexin/message.js

@@ -45,7 +45,7 @@ function getDeviceInfo(payloads) {
         var device = deviceList[i];
         var deviceId = device.deviceId;
         if (device.connectType != 3) {
-          continue
+          continue;
         }
         var mac = lexin_util.getMacByDeviceId(deviceId);
         var index = SrcDeviceName.indexOf(mac);
@@ -102,7 +102,10 @@ function getDeviceInfo(payloads) {
         var clientTypes = lexin_devices.clientTypes;
         for (var i = 0; i < clientTypes.length; i++) {
           if (clientTypes[i] == targetDevice.ProdModel) {
-            pages[0].refreshCurrentDevice(device);
+            var deviceListSelect = pages[0].getDeviceListSelect();
+            if (deviceListSelect == null) {
+              pages[0].refreshCurrentDevice(device);
+            }
             break;
           }
         }