Procházet zdrojové kódy

feature: 解决设备列表给出的设备名称没对应上问题

Damon před 7 měsíci
rodič
revize
2974d100e9
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      utils/lexin/message.js

+ 4 - 4
utils/lexin/message.js

@@ -52,20 +52,20 @@ function getDeviceInfo(payloads) {
           var devName = other.devName;
           var ProdModel = other.ProdModel;
 
-          if (device.devName != devName) {
-            device.devName = devName;
-          }
-
           if (device.ProdModel != ProdModel) {
             device.ProdModel = ProdModel;
           }
 
           ///设置图片
+          if (device.devName != devName) {
+            device.devName = devName;
+          }
           var classifyProducts = app.globalData.classifyProducts;
           if (!strings.isEmpty(classifyProducts)) {
             for (var i = 0; i < classifyProducts.length; i++) {
               var productItem = classifyProducts[i];
               if (productItem.clientType == ProdModel) {
+                device.devName = productItem.name;
                 device.imageUrl = productItem.img;
                 device.offlineImg = productItem.offlineImg;
                 break;