From 43fc159e27da43686263ac960799fc0fe8f71c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E5=BE=88=E5=B7=AE=E5=95=A6?= <17633066053@163.com> Date: Thu, 19 Jan 2023 15:59:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E5=A4=8D=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=88=97=E8=A1=A8=E6=9C=89=E4=BF=83=E9=94=80=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E4=B8=8D=E6=98=BE=E7=A4=BABug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/m-goods-list/list.vue | 5 +++-- components/m-goods-list/promotion.vue | 4 ++++ pages/mine/set/setUp.vue | 2 ++ pages/product/comment.vue | 2 +- pages/promotion/point/pointList.vue | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) 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] }} + +