diff --git a/components/m-goods-list/list.vue b/components/m-goods-list/list.vue index 4c1ac7f..a41ac7d 100644 --- a/components/m-goods-list/list.vue +++ b/components/m-goods-list/list.vue @@ -179,9 +179,10 @@ }, // 数据去重一下 只显示一次 减免 劵 什么的 getPromotion(item) { - if (item.promotionMap) { + if (item.content ? item.content.promotionMap : item.promotionMap) { + const fieldList = item.content ? item.content.promotionMap : item.promotionMap let array = []; - Object.keys(item.promotionMap).forEach((child) => { + Object.keys(fieldList).forEach((child) => { if (!array.includes(child.split("-")[0])) { array.push(child.split("-")[0]); } diff --git a/components/m-goods-list/promotion.vue b/components/m-goods-list/promotion.vue index 356874e..cda283c 100644 --- a/components/m-goods-list/promotion.vue +++ b/components/m-goods-list/promotion.vue @@ -24,6 +24,10 @@ $options.filters.goodsFormatPrice(item.purchasePrice )[1] }} + +