|
@@ -256,10 +256,10 @@ Page({
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+
|
|
// 更新信息
|
|
// 更新信息
|
|
- ///连上就调用2次
|
|
|
|
|
|
+ ///连上就调用2次 payloads.SrcDeviceName:AIrSMArT_7cdfa1fcbb24
|
|
var isUpdate = false;
|
|
var isUpdate = false;
|
|
- // payloads.SrcDeviceName:AIrSMArT_7cdfa1fcbb24
|
|
|
|
var deviceList = that.data.deviceList;
|
|
var deviceList = that.data.deviceList;
|
|
if (!strings.isEmpty(deviceList)) {
|
|
if (!strings.isEmpty(deviceList)) {
|
|
for (var i = 0; i < deviceList.length; i++) {
|
|
for (var i = 0; i < deviceList.length; i++) {
|
|
@@ -268,7 +268,7 @@ Page({
|
|
var splitDeviceId = deviceId.split("BLUFI_");
|
|
var splitDeviceId = deviceId.split("BLUFI_");
|
|
if (splitDeviceId.length == 2) {
|
|
if (splitDeviceId.length == 2) {
|
|
var index = payloads.SrcDeviceName.indexOf(splitDeviceId[1]);
|
|
var index = payloads.SrcDeviceName.indexOf(splitDeviceId[1]);
|
|
- if (index !== -1 && deviceList[i].ProdModel != payloads.other.ProdModel && deviceList[i].devName != payloads.other.devName) {
|
|
|
|
|
|
+ if (index !== -1 && (deviceList[i].ProdModel != payloads.other.ProdModel || deviceList[i].devName != payloads.other.devName)) {
|
|
isUpdate = true;
|
|
isUpdate = true;
|
|
deviceList[i].ProdModel = payloads.other.ProdModel;
|
|
deviceList[i].ProdModel = payloads.other.ProdModel;
|
|
deviceList[i].devName = payloads.other.devName;
|
|
deviceList[i].devName = payloads.other.devName;
|
|
@@ -664,9 +664,11 @@ Page({
|
|
return;
|
|
return;
|
|
};
|
|
};
|
|
|
|
|
|
- console.log("gadsfqwwerqwerqweqr====" + JSON.stringify(that.data.deviceList[that.data.deviceListIndex]));
|
|
|
|
|
|
+ var deviceList = that.data.deviceList;
|
|
|
|
+ var deviceListIndex = that.data.deviceListIndex;
|
|
|
|
+ var device = deviceList[deviceListIndex];
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
- url: './../deviceWake/deviceWake?deviceId=' + that.data.deviceList[that.data.deviceListIndex].deviceId + "&clientType=" + that.data.deviceList[that.data.deviceListIndex].ProdModel,
|
|
|
|
|
|
+ url: './../deviceWake/deviceWake?deviceId=' + device.deviceId + "&clientType=" + device.ProdModel,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -887,7 +889,6 @@ Page({
|
|
deviceId: newDevice.deviceId,
|
|
deviceId: newDevice.deviceId,
|
|
name: "猫王小王子OTR-X",
|
|
name: "猫王小王子OTR-X",
|
|
state: "online",
|
|
state: "online",
|
|
- ProdModel: 3,
|
|
|
|
devName: "猫王小王子OTR-X",
|
|
devName: "猫王小王子OTR-X",
|
|
mac: newDevice.deviceId,
|
|
mac: newDevice.deviceId,
|
|
image: "./../../img/min.png",
|
|
image: "./../../img/min.png",
|