shawenguan 1 an în urmă
părinte
comite
753e1d1f03
1 a modificat fișierele cu 7 adăugiri și 3 ștergeri
  1. 7 3
      Scripts/imoutai/imoutaiHelper.js

+ 7 - 3
Scripts/imoutai/imoutaiHelper.js

@@ -630,13 +630,17 @@ async function getShopItem(sessionId, itemId, token, deviceId, province, city, d
                                 const shops = rspData.shops || [];
                                 // lk.log(`data=${JSON.stringify(shopIds)}`);
                                 for (let i = 0; i < shops.length; i++) {
+                                    const skuData = shops[i];
                                     const shopId = shops[i].shopId;
                                     const items = shops[i].items;
-                                    const shopInfo = shops[i];
                                     if(shopIds.indexOf(shopId) > -1){
-                                        if (checkShopItemIdIndex(shopInfo, itemId) > -1) {
-                                            lk.log(`shopDetail=${JSON.stringify(G_SHOP_SRC_MAP[shopId])}`);
+                                        const shopInfo = G_SHOP_SRC_MAP[shopId];
+                                        if (district && !new RegExp(district).test(shopInfo.districtName)){
+                                            continue;
+                                        }
+                                        if (checkShopItemIdIndex(skuData, itemId) > -1) {
                                             lk.log(`shopInfo=${JSON.stringify(shopInfo)}`);
+                                            lk.log(`skuData=${JSON.stringify(skuData)}`);
                                             ret = shopId;
                                             break;
                                         }