Browse Source

feat(data-helper): 过滤掉状态为1的商铺信息

在处理商场信息时,新增过滤条件,排除状态为1的商铺,
确保返回的商铺列表只包含有效状态的商铺数据。
master
jiannibang 8 months ago
parent
commit
545316d3b0
  1. 22
      src/js/helpers/data-helper.js

22
src/js/helpers/data-helper.js

@ -168,16 +168,18 @@ const getMallInfo = async ({ memberID }) => {
const shopInfo = serverShopInfo.map(({ floorOrd: floorOrder, shopList }) => ({ const shopInfo = serverShopInfo.map(({ floorOrd: floorOrder, shopList }) => ({
floorOrder, floorOrder,
shopList: shopList.map((iot) => ({
...iot,
code: iot.shopCode,
houseNum: iot.houseNumber,
logoPath: cdnUrl + iot.logoUrl,
shopFormat: iot.industryFatherName,
intro: true,
formatColor: iot.color,
floorOrder,
})),
shopList: shopList
.filter(({ status }) => status !== 1)
.map((iot) => ({
...iot,
code: iot.shopCode,
houseNum: iot.houseNumber,
logoPath: cdnUrl + iot.logoUrl,
shopFormat: iot.industryFatherName,
intro: true,
formatColor: iot.color,
floorOrder,
})),
})); }));
shopInfo.forEach(({ shopList }) => shopInfo.forEach(({ shopList }) =>

Loading…
Cancel
Save