From a9e1505680c7dd45840975b38451ef88d451e6d4 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 17 三月 2026 14:41:12 +0800
Subject: [PATCH] 代码优化

---
 mini-program/pages/index/index.vue |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/mini-program/pages/index/index.vue b/mini-program/pages/index/index.vue
index d995322..48a91e5 100644
--- a/mini-program/pages/index/index.vue
+++ b/mini-program/pages/index/index.vue
@@ -118,7 +118,7 @@
 							</view>
 						</view>
 						<view class="commodity-item-shou">
-							<text>宸插敭{{(item.saleNum||0) + (item.realSaleNum||0)}}</text>
+							<text>宸插敭{{item.shou}}</text>
 							<view class="commodity-item-shou-add" @click.stop="addCard(item)">+</view>
 						</view>
 					</view>
@@ -276,6 +276,7 @@
 					if (res.code === 200) {
 						res.data.records.forEach(item => {
 							item.minPrice = item.minPrice.toFixed(2).split('.')
+							item.shou = (item.salenum || 0) + (item.realSaleNum || 0)
 						})
 						this.goodsList.push(...res.data.records)
 						this.page++
@@ -576,6 +577,11 @@
 						box-sizing: border-box;
 
 						.commodity-item-box-title {
+							width: 100%;
+							display: -webkit-box;
+							-webkit-box-orient: vertical;
+							-webkit-line-clamp: 2;
+							overflow: hidden;
 							font-weight: 600;
 							font-size: 30rpx;
 							color: #222222;

--
Gitblit v1.9.3