|
@@ -25,7 +25,7 @@
|
|
<view class="flex-between-center" style="padding-right: 53rpx;">
|
|
<view class="flex-between-center" style="padding-right: 53rpx;">
|
|
<text class="mer-tj">今日推荐</text>
|
|
<text class="mer-tj">今日推荐</text>
|
|
<text class="goods-score">{{recommendObj.score}}</text>
|
|
<text class="goods-score">{{recommendObj.score}}</text>
|
|
- <text class="goods-info">月销量{{recommendObj.salesVolume}}</text>
|
|
|
|
|
|
+ <text class="goods-info">月销量{{getFormattedSales(recommendObj.salesVolume)}}</text>
|
|
<text v-if="!recommendObj.isfreeDeliverfee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text>
|
|
<text v-if="!recommendObj.isfreeDeliverfee" class="goods-info" style="color: #E5AD21;margin-left: 18rpx;">免配送费</text>
|
|
<view v-if="!recommendObj.isfreeDeliverfee && recommendObj.freeDeliverFee > 0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
|
|
<view v-if="!recommendObj.isfreeDeliverfee && recommendObj.freeDeliverFee > 0" style="color: #999999;font-size: 21rpx;margin-left: 10rpx;text-decoration: line-through;">¥
|
|
{{recommendObj.freeDeliverFee}}</view>
|
|
{{recommendObj.freeDeliverFee}}</view>
|
|
@@ -81,7 +81,7 @@
|
|
|
|
|
|
<view style="margin-top: 10rpx;">
|
|
<view style="margin-top: 10rpx;">
|
|
<text class="goods-score">{{item.score}}</text>
|
|
<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: 10rpx;">月销 {{getFormattedSales(item.salesVolume)}}</text>
|
|
<text class="goods-info" style="margin-left: 25rpx;">人均 ¥ {{item.perCapita}}</text>
|
|
<text class="goods-info" style="margin-left: 25rpx;">人均 ¥ {{item.perCapita}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -95,7 +95,7 @@
|
|
<text class="goods-info" style="margin-left: 38rpx;">10分钟</text>
|
|
<text class="goods-info" style="margin-left: 38rpx;">10分钟</text>
|
|
<text class="goods-info" style="margin-left: 10rpx;">{{item.distance}}</text>
|
|
<text class="goods-info" style="margin-left: 10rpx;">{{item.distance}}</text>
|
|
</view>
|
|
</view>
|
|
- <view style="margin-top: 22rpx;"><text class="goods-sales">已售卖{{item.salesAllNum}}单</text></view>
|
|
|
|
|
|
+ <view style="margin-top: 22rpx;"><text class="goods-sales">已售卖{{getFormattedSales(item.salesAllNum)}}单</text></view>
|
|
<view style="margin-top: 14rpx;">
|
|
<view style="margin-top: 14rpx;">
|
|
<text class="goods-labels" v-for="(item2,index2) in item.discountLabel" :key="index2">{{item2}}</text>
|
|
<text class="goods-labels" v-for="(item2,index2) in item.discountLabel" :key="index2">{{item2}}</text>
|
|
</view>
|
|
</view>
|
|
@@ -216,6 +216,10 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getFormattedSales(value) {
|
|
|
|
+ // 转换成字符串,然后截取前三位,并添加“+”
|
|
|
|
+ return value.length>3?`${String(value).slice(0, 3)}+`:value;
|
|
|
|
+ },
|
|
onScrollBottom() {
|
|
onScrollBottom() {
|
|
if (!this.loadTitle) {
|
|
if (!this.loadTitle) {
|
|
this.getMatchedData()
|
|
this.getMatchedData()
|