|
@@ -34,6 +34,7 @@ function getDeviceInfo(payloads) {
|
|
|
const app = getApp();
|
|
|
const strings = require('../strings');
|
|
|
const lexin_util = require('../lexin/util');
|
|
|
+ const lexin_devices = require('../lexin/devices');
|
|
|
var pages = getCurrentPages();
|
|
|
var deviceList = pages[0].getDeviceList();
|
|
|
if (!strings.isEmpty(deviceList)) {
|
|
@@ -81,14 +82,26 @@ function getDeviceInfo(payloads) {
|
|
|
|
|
|
/// 去更新选中目标
|
|
|
if (!strings.isEmpty(currentDeviceId)) {
|
|
|
+ var targetDevice = null;
|
|
|
for (var i = 0; i < deviceList.length; i++) {
|
|
|
var device = deviceList[i];
|
|
|
var deviceId = device.deviceId;
|
|
|
if (deviceId == currentDeviceId) {
|
|
|
- pages[0].refreshCurrentDevice(device);
|
|
|
+ targetDevice = device;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ ///处理目标设备
|
|
|
+ if (targetDevice != null) {
|
|
|
+ var clientTypes = lexin_devices.clientTypes;
|
|
|
+ for (var i = 0; i < clientTypes.length; i++) {
|
|
|
+ if (clientTypes[i] == targetDevice.ProdModel) {
|
|
|
+ pages[0].refreshCurrentDevice(device);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|