|
@@ -30,7 +30,6 @@ function getDeviceInfo(payloads) {
|
|
var other = payloads.other;
|
|
var other = payloads.other;
|
|
var SrcDeviceName = payloads.SrcDeviceName;
|
|
var SrcDeviceName = payloads.SrcDeviceName;
|
|
|
|
|
|
- console.log("gasdfqwerqwerqr==333==");
|
|
|
|
///连上就调用2次 payloads.SrcDeviceName:AIrSMArT_7cdfa1fcbb24
|
|
///连上就调用2次 payloads.SrcDeviceName:AIrSMArT_7cdfa1fcbb24
|
|
const app = getApp();
|
|
const app = getApp();
|
|
const strings = require('../strings');
|
|
const strings = require('../strings');
|
|
@@ -56,14 +55,15 @@ function getDeviceInfo(payloads) {
|
|
device.devName = devName;
|
|
device.devName = devName;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ///设置图片
|
|
if (!strings.isEmpty(ProdModel)) {
|
|
if (!strings.isEmpty(ProdModel)) {
|
|
- ///设置图片
|
|
|
|
var classifyProducts = app.globalData.classifyProducts;
|
|
var classifyProducts = app.globalData.classifyProducts;
|
|
if (!strings.isEmpty(classifyProducts)) {
|
|
if (!strings.isEmpty(classifyProducts)) {
|
|
for (var i = 0; i < classifyProducts.length; i++) {
|
|
for (var i = 0; i < classifyProducts.length; i++) {
|
|
- if (classifyProducts.clientType == ProdModel) {
|
|
|
|
- if (!strings.isEmpty(classifyProducts.img) && device.imageUrl != classifyProducts.img) {
|
|
|
|
- device.imageUrl = classifyProducts.img;
|
|
|
|
|
|
+ var productItem = classifyProducts[i];
|
|
|
|
+ if (productItem.clientType == ProdModel) {
|
|
|
|
+ if (!strings.isEmpty(productItem.img) && device.imageUrl != productItem.img) {
|
|
|
|
+ device.imageUrl = productItem.img;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -80,13 +80,11 @@ function getDeviceInfo(payloads) {
|
|
}
|
|
}
|
|
|
|
|
|
/// 去更新选中目标
|
|
/// 去更新选中目标
|
|
- console.log("gasdfqwerqwerqr==444==" + currentDeviceId);
|
|
|
|
if (!strings.isEmpty(currentDeviceId)) {
|
|
if (!strings.isEmpty(currentDeviceId)) {
|
|
for (var i = 0; i < deviceList.length; i++) {
|
|
for (var i = 0; i < deviceList.length; i++) {
|
|
var device = deviceList[i];
|
|
var device = deviceList[i];
|
|
var deviceId = device.deviceId;
|
|
var deviceId = device.deviceId;
|
|
if (deviceId == currentDeviceId) {
|
|
if (deviceId == currentDeviceId) {
|
|
- console.log("gasdfqwerqwerqr==555==" + JSON.stringify(device));
|
|
|
|
pages[0].refreshCurrentDevice(device);
|
|
pages[0].refreshCurrentDevice(device);
|
|
break;
|
|
break;
|
|
}
|
|
}
|