shawenguan 1 год назад
Родитель
Сommit
5fb8b53a63
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      Scripts/imoutai/imoutaiHelper.js

+ 3 - 4
Scripts/imoutai/imoutaiHelper.js

@@ -501,16 +501,15 @@ async function getShopItem(sessionId, itemId, token, deviceId, province, city, z
                             const shops = rspData.shops || [];
                             const shopIds = G_P_C_MAP[province][city];
                             lk.log(`data=${JSON.stringify(shopIds)}`);
-                            if(shopIds.indexOf(shopObj.shopId) > -1){
-                                for (let i = 0; i < shops.lenght; i++) {
-                                    const shopObj = shops[i];
+                            for (let i = 0; i < shops.lenght; i++) {
+                                const shopObj = shops[i];
+                                if(shopIds.indexOf(shopObj.shopId) > -1){
                                     lk.log(`${itemId} ${JSON.stringify(shopObj)}`);
                                     if (shopObj.shopId && shopId.indexOf(itemId) > -1) {
                                         ret = shopObj.shopId;
                                         break;
                                     }
                                 }
-
                             }
                         }
                     }