Compare commits

...

2 Commits

Author SHA1 Message Date
朱志育 aad0d0a2cd Merge pull request 'feat: 过滤关闭状态的店铺' (#14) from dev into test 1 year ago
jiannibang f2398c7b4c feat: 过滤关闭状态的店铺 1 year ago
  1. 24
      src/js/helpers/data-helper.js

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

@ -137,17 +137,19 @@ const getMallInfo = async (code) => {
);
const shopInfo = serverShopInfo.map(({ floorOrd: floorOrder, shopList }) => ({
floorOrder,
shopList: shopList.map((iot) => ({
...iot,
code: iot.shopCode,
houseNum: iot.houseNumber,
logoPath: cdnUrl + iot.logoUrl,
shopFormat: iot.industryFatherName,
shopFormatName: iot.industryFatherName,
intro: true,
formatColor: iot.color,
floorOrder,
})),
shopList: shopList
.filter(({ status }) => status === 0)
.map((iot) => ({
...iot,
code: iot.shopCode,
houseNum: iot.houseNumber,
logoPath: cdnUrl + iot.logoUrl,
shopFormat: iot.industryFatherName,
shopFormatName: iot.industryFatherName,
intro: true,
formatColor: iot.color,
floorOrder,
})),
}));
shopInfo.forEach(({ shopList }) =>

Loading…
Cancel
Save