|
|
@@ -54,7 +54,7 @@ const iMT_Location = {
|
|
|
|
|
|
const iMT_BuyItemCodes = ["10941", "10942"]; // 申购商品ID名单列表
|
|
|
|
|
|
-let iMT_DynProducts = {};
|
|
|
+let iMT_DynProducts = [];
|
|
|
|
|
|
let retBody;
|
|
|
if (!lk.isExecComm) {
|
|
|
@@ -112,7 +112,7 @@ async function main() {
|
|
|
];
|
|
|
for(let i=0; i < itemCodes.length;i++){
|
|
|
const itemId = itemCodes[i];
|
|
|
- lk.log(`#############[${itemId}]${iMT_Products[itemId]}#############`);
|
|
|
+ lk.log(`###[${itemId}]${iMT_Products[itemId]}###`);
|
|
|
let maxShopData = await getShopItem(sessionId,itemId,userData.token,userData.deviceId,province,city,iMT_Location.district||'',zeroTimeStamp);
|
|
|
if(!maxShopData || maxShopData.shopId == '0'){
|
|
|
continue;
|
|
|
@@ -120,7 +120,7 @@ async function main() {
|
|
|
let maxShopId = maxShopData.shopId;
|
|
|
lk.log(`maxShopId=${maxShopId}`);
|
|
|
const maxShopItemData = maxShopData.itemData;// const { count, itemId, inventory, ownerName } = maxShopItemData;
|
|
|
- let maxShopMsg = `【${maxShopItemData.ownerName}】[${maxShopId}-${itemId}] ${getProductInfo(itemId, 'title')} 价格:${getProductInfo(itemId, 'price')} 库存:${maxShopItemData.inventory}`;
|
|
|
+ let maxShopMsg = `[${maxShopId}-${itemId}] ${getProductInfo(itemId, 'title')} 价格:${getProductInfo(itemId, 'price')} 库存:${maxShopItemData.inventory}`;
|
|
|
lk.log(maxShopMsg);
|
|
|
msgItems.push({
|
|
|
name: '申购产品',
|
|
|
@@ -701,7 +701,6 @@ async function getShopItem(sessionId, itemId, token, deviceId, province, city, d
|
|
|
const rspData = jsonRetObj.data || {};
|
|
|
let shops = rspData.shops || [];
|
|
|
iMT_DynProducts = rspData.items || [];
|
|
|
- lk.log(`data=${JSON.stringify(rspData.items)}`);
|
|
|
if(fliterRule == 0){
|
|
|
shops = fliterShopByDistance(itemId, shops, iMT_Location.lat, iMT_Location.lng);
|
|
|
}else if(fliterRule == 1){
|