|
@@ -50,22 +50,23 @@
|
|
|
<view style="margin-top: 10rpx;">
|
|
|
<text class="goods-score">{{item.score}}</text>
|
|
|
<text class="goods-info" style="margin-left: 10rpx;">月销 {{item.salesVolume}}</text>
|
|
|
- <text class="goods-info" style="margin-left: 25rpx;">人均 ¥ {{item.perCapita}}</text>
|
|
|
+ <text class="goods-info" style="margin-left: 25rpx;">人均 ¥ {{item.perCapita==null?0:item.perCapita}}</text>
|
|
|
</view>
|
|
|
|
|
|
<view style="margin-top: 10rpx;display: flex;align-items: center;">
|
|
|
- <text class="goods-info">起送 ¥ {{item.perCapita}}</text>
|
|
|
- <text v-if="!item.isfreeDeliverfee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text>
|
|
|
- <view v-if="!item.isfreeDeliverfee && item.freeDeliverFee > 0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
|
|
|
- {{item.freeDeliverFee}}</view>
|
|
|
- <text v-if="item.isfreeDeliverfee" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;">配送费¥
|
|
|
- {{item.distCosts}}</text>
|
|
|
- <text class="goods-info" style="margin-left: 38rpx;">10分钟</text>
|
|
|
+ <!-- <text class="goods-info">起送 ¥ {{item.perCapita}}</text> -->
|
|
|
+ <text class="goods-info">起送 ¥ {{item.deliveryFee==null?0:item.deliveryFee}}</text>
|
|
|
+ <!-- <text v-if="!item.isfreeDeliverfee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text> -->
|
|
|
+ <text v-if="item.isFreeDeliverFee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text>
|
|
|
+ <!-- <view v-if="!item.isfreeDeliverfee && item.freeDeliverFee > 0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
|
|
|
+ {{item.freeDeliverFee}}</view> -->
|
|
|
+ <view v-if="item.isFreeDeliverFee && item.freeDeliverFee>0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
|
|
|
+ {{item.freeDeliverFee}}</view>
|
|
|
+ <text v-if="!item.isFreeDeliverFee" class="goods-info" style="color: #999999;margin-left: 40rpx;">配送费¥{{item.distCosts}}</text>
|
|
|
+ <text class="goods-info" style="margin-left: 38rpx;">{{item.deliverTime}}分钟</text>
|
|
|
<text class="goods-info" style="margin-left: 10rpx;">{{item.distance}}</text>
|
|
|
</view>
|
|
|
-
|
|
|
- <view style="margin-top: 22rpx;"><text class="goods-sales">已售卖{{item.salesVolume}}件</text></view>
|
|
|
-
|
|
|
+ <view style="margin-top: 22rpx;"><text class="goods-sales">已售卖{{getFormattedSales(item.salesAllNum)}}单</text></view>
|
|
|
<view style="margin-top: 14rpx;">
|
|
|
<swiper :indicator-dots="false" :autoplay="true" :circular="true" :display-multiple-items="3" style="height: 43rpx;">
|
|
|
<swiper-item v-for="(item2,index2) in item.discountLabel" :key="index2">
|
|
@@ -192,6 +193,10 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ getFormattedSales(value) {
|
|
|
+ // 转换成字符串,然后截取前三位,并添加“+”
|
|
|
+ return value.length>3?`${String(value).slice(0, 3)}+`:value;
|
|
|
+ },
|
|
|
// getTag(){
|
|
|
// return this.labelList.filter((ite => ite.checked)).map(ite => ite.id).join(',')
|
|
|
// },
|