zhaoyun vor 11 Stunden
Ursprung
Commit
c3fa5174c0

+ 5 - 1
mer_uniapp/pages/index/index.vue

@@ -138,7 +138,7 @@
 						<text class="goods-info" style="margin-left: 10rpx;">{{item.distance}}</text>
 					</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;">
 						<text class="goods-labels" v-for="(item2,index2) in item.discountLabel" :key="index2">{{item2}}</text>
@@ -228,6 +228,10 @@
 			that.initLocation();
 		},
 		methods: {
+		 getFormattedSales(value) {
+			      // 转换成字符串,然后截取前三位,并添加“+”
+			      return value.length>3?`${String(value).slice(0, 3)}+`:value;
+		 },
 			initLocation() {
 				let that = this;
 				this.$util.$L.getLocation().then(res => {

+ 7 - 3
mer_uniapp/pages/merchant/home/index.vue

@@ -27,7 +27,7 @@
 								</view>
 								<view class="store-score" style="margin: 7rpx 0;">
 									<text style="font-weight: 600;font-size: 27rpx;color: #FD6716;">{{ merchanInfo.starLevel }}分</text>
-									<text style="font-size: 21rpx;color: #999999;margin-left: 6rpx;">月销 {{ merchanInfo.sales || 0 }}</text>
+									<text style="font-size: 21rpx;color: #999999;margin-left: 6rpx;">月销 {{getFormattedSales(merchanInfo.sales )|| 0 }}</text>
 								</view>
 							</view>
 						</view>
@@ -100,7 +100,7 @@
 										<view class="right">
 											<text class="name">{{ good.name }}</text>
 											<view class="tips">
-												<text>销量 {{good.sales}}</text>
+												<text>销量 {{getFormattedSales(good.sales)}}</text>
 												<text style="margin-left: 39rpx;">好评率 {{ good.replyChance*100}}%</text>
 											</view>
 											<view class="price_and_action">
@@ -155,7 +155,7 @@
 									<text class="name">{{ good.name }}</text>
 									<view class="tips">
 										<text>{{ good.props_text }}</text>
-										<text style="margin-left: 39rpx;">销量 {{good.sales}}</text>
+										<text style="margin-left: 39rpx;">销量 {{getFormattedSales(good.sales)}}</text>
 										<text style="margin-left: 39rpx;">好评率 {{ good.replyChance*100}}%</text>
 									</view>
 									<view class="price_and_action">
@@ -446,6 +446,10 @@
 			}
 		},
 		methods: {
+			getFormattedSales(value) {
+						      // 转换成字符串,然后截取前三位,并添加“+”
+						      return value.length>3?`${String(value).slice(0, 3)}+`:value;
+			},
 			getMerchantInfoData() {
 				getMerchantInfo(this.merId).then(res => {
 					this.merchanInfo = res.data

+ 1 - 1
mer_uniapp/pages/order_addcart/order_addcart.vue

@@ -140,7 +140,7 @@
 						<image :src="urlDomain+'crmebimage/presets/noShopper.png'"></image>
 						<view class="text-ccc">购物车为空哦~</view>
 					</view>
-					<recommend ref="recommendIndex"></recommend>
+					<!-- <recommend ref="recommendIndex"></recommend> -->
 				</view>
 				<!-- #ifdef H5 -->
 				<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class="uni-p-b-96"></view>

+ 7 - 3
mer_uniapp/pages/takeout/index.vue

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