gaoyuan 7 months ago
parent d6c39f46d5
commit 8348c18f69

@ -118,6 +118,7 @@ def get_shop_item(sessionId, itemId, device_id, token, province, city):
data = response.json().get('data', {}) data = response.json().get('data', {})
shops = data.get('shops', []) shops = data.get('shops', [])
shop_id_ = p_c_map[province][city] shop_id_ = p_c_map[province][city]
shopIdList=[]
for shop in shops: for shop in shops:
if not shop.get('shopId') in shop_id_: if not shop.get('shopId') in shop_id_:
continue continue
@ -127,7 +128,13 @@ def get_shop_item(sessionId, itemId, device_id, token, province, city):
continue continue
else: else:
print("申购详情itemId:",itemId,"shopId:",shop.get('shopId')) print("申购详情itemId:",itemId,"shopId:",shop.get('shopId'))
return shop.get('shopId') shopIdList.append(shop.get('shopId'))
continue
# 随机一个无锡市内的shop
print("可选shop数量",len(shopIdList))
randomIndex=random.randint(0, len(shopIdList)-1)
print("可选randomIndex",randomIndex)
return shopIdList[randomIndex]
def get_user_id(token, Device_ID): def get_user_id(token, Device_ID):

Loading…
Cancel
Save