|
@@ -134,7 +134,7 @@ Page({
|
|
|
try {
|
|
|
var list = JSON.parse(l);
|
|
|
that.updateDeviceList(list, true);
|
|
|
- } catch (e) {}
|
|
|
+ } catch (e) { }
|
|
|
// that.tryConnectBle()
|
|
|
}
|
|
|
|
|
@@ -916,8 +916,8 @@ Page({
|
|
|
deviceId: newDevice.deviceId,
|
|
|
name: newDevice.name,
|
|
|
state: "online",
|
|
|
- ProdModel: newDevice.ProdModel,
|
|
|
- clientType: newDevice.ProdModel,
|
|
|
+ ProdModel: newDevice.ProdModel || newDevice.clientType,
|
|
|
+ clientType: newDevice.clientType || newDevice.ProdModel,
|
|
|
devName: newDevice.name,
|
|
|
mac: newDevice.mac,
|
|
|
img: newDevice.img,
|
|
@@ -980,7 +980,9 @@ Page({
|
|
|
|
|
|
///更新列表排序
|
|
|
updateDeviceList(deviceList, isInit) {
|
|
|
- if (deviceList.length == 0) {
|
|
|
+ console.log("更新设备列表0:", deviceList);
|
|
|
+
|
|
|
+ if (deviceList.length <= 0) {
|
|
|
return;
|
|
|
}
|
|
|
|