fix: 🐛 修复商品列表有促销活动不显示Bug

master
学习很差啦 2023-01-19 15:59:10 +08:00
parent 2e37cb8158
commit 43fc159e27
5 changed files with 11 additions and 4 deletions

View File

@ -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]);
}

View File

@ -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>

View File

@ -15,7 +15,9 @@
<!-- #ifdef APP-PLUS -->
<u-cell-item title="清除缓存" :value="fileSizeString" @click="clearCache"></u-cell-item>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item>
<!-- #endif -->
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
<!-- #ifndef H5 -->
<!-- #endif -->

View File

@ -20,7 +20,7 @@
</div>
<view class="eva-box" v-for="(item, index) in commDetail" :key="index">
<view class="section-info">
<image class="portrait" :src="item.memberProfile || userImage" mode="aspectFill"></image>
<image class="portrait" :src="item.memberProfile || userImage" mode="aspectFit"></image>
<view class="star-content">
<text class="name">{{ item.memberName | noPassByName }}</text>
<text class="time">{{ item.createTime }}</text>

View File

@ -19,7 +19,7 @@
<view class="index-items">
<view class="index-item" v-for="(item, key) in nav.goods" :key="key" @click="toGoods(item)">
<view class="index-item-img">
<u-image :src="item.thumbnail" mode="aspectFill">
<u-image :src="item.thumbnail" mode="aspectFit">
<u-loading slot="loading"></u-loading>
</u-image>
<view class="index-item-title">{{ item.goodsName }}</view>