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

+ 15 - 11
Scripts/imoutai/imoutaiHelper.js

@@ -122,10 +122,10 @@ async function main() {
             });
         }
     }
-    let retAward = await getUserEnergyAward(userData.token, userData.deviceId);
-    if(retAward){
-        msgItems.push(retAward);
-    }
+    // let retAward = await getUserEnergyAward(userData.token, userData.deviceId);
+    // if(retAward){
+    //     msgItems.push(retAward);
+    // }
     lk.log("#############4");
     let msg = '';
     for(let i=0; i < msgItems.length; i++){
@@ -499,14 +499,18 @@ async function getShopItem(sessionId, itemId, token, deviceId, province, city, z
                         if (jsonRetObj.code == 2000) {
                             const rspData = jsonRetObj.data || {};
                             const shops = rspData.shops || [];
-                            const shopId = G_P_C_MAP[province][city];
-                            lk.log(`data=${JSON.stringify(shopId)}`);
-                            for (let i = 0; i < shops.lenght; i++) {
-                                const shopObj = shops[i];
-                                if (shopObj.shopId && shopId.indexOf(shopObj.shopId) > -1) {
-                                    ret = shopObj.shopId;
-                                    break;
+                            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];
+                                    lk.log(`${itemId} ${JSON.stringify(shopObj)}`);
+                                    if (shopObj.shopId && shopId.indexOf(itemId) > -1) {
+                                        ret = shopObj.shopId;
+                                        break;
+                                    }
                                 }
+
                             }
                         }
                     }