mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-17 16:05:53 +08:00
fix: 🐛 修复商品列表有促销活动不显示Bug
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
$options.filters.goodsFormatPrice(item.purchasePrice )[1]
|
||||
}}
|
||||
</div>
|
||||
<!-- 兜底策略如果金额是0 -->
|
||||
<div class="price" v-if="!item.price">
|
||||
¥<span>0 </span>.00
|
||||
</div>
|
||||
</view>
|
||||
<div>
|
||||
<image class='buy' :src="buy"></image>
|
||||
|
||||
Reference in New Issue
Block a user