From 47d56a8b0f22fb15a46b69dfd46fac23560ad2cd Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 12 五月 2026 09:07:49 +0800
Subject: [PATCH] 改bug

---
 mini-program/pages/index/index.vue |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/mini-program/pages/index/index.vue b/mini-program/pages/index/index.vue
index 0a15e6e..df667fc 100644
--- a/mini-program/pages/index/index.vue
+++ b/mini-program/pages/index/index.vue
@@ -10,13 +10,13 @@
 				</view>
 			</view>
 			<view class="search" @click="jumpSearch">
-				<u-search placeholder="璇疯緭鍏ュ晢	鍝佸悕绉版悳绱�" disabled height="36" searchIconColor="#999999" borderColor="#eeeeee"
+				<u-search placeholder="璇疯緭鍏ュ晢鍝佸悕绉版悳绱�" disabled height="36" searchIconColor="#999999" borderColor="#eeeeee"
 					bgColor="rgba(255,255,255,0.9)" :showAction="false" />
 			</view>
 			<view class="banner">
 				<u-swiper :list="list" keyName="imgurl" height="150" indicator indicatorMode="dot" @click="jumpBanner"></u-swiper>
 			</view>
-			<swiper class="cate" @change="changeCate">
+			<swiper class="cate" @change="changeCate" v-if="labels.length > 0" :style="{ height: labels[0].length <= 4 ? '150rpx' : '' }">
 				<swiper-item v-for="(item, index) in labels" :key="index">
 					<view class="cate-list">
 						<view class="cate-item" v-for="(child, a) in item" :key="a" @click="jumpSearch1(child, 1)">
@@ -48,7 +48,7 @@
 			<view class="title">
 				<view class="title-left">閫傜敤鍝佺墝</view>
 			</view>
-			<swiper class="pingpai" @change="changeBrand">
+			<swiper class="pingpai" @change="changeBrand" v-if="brand.length > 0" :style="{ height: brand[0].length <= 2 ? '130rpx' : '' }">
 				<swiper-item v-for="(item, index) in brand" :key="index">
 					<view class="pingpai-list">
 						<view class="pingpai-item" v-for="(child, a) in item" :key="a" @click="jumpSearch1(child, 2)">
@@ -114,20 +114,20 @@
 								<text>.{{item.minPrice[1]}}</text>
 							</view>
 							<view class="commodity-item-box-price-b">
-								楼{{item.price}}
+								楼{{item.linePrice || 0}}
 							</view>
 						</view>
 						<view class="commodity-item-shou">
-							<text>宸插敭{{item.saleNum + item.realSaleNum}}</text>
+							<text>宸插敭{{item.shou}}</text>
 							<view class="commodity-item-shou-add" @click.stop="addCard(item)">+</view>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-		<view class="dingwei" v-if="isShow">
+		<view class="dingwei" v-if="!position">
 			<view class="dingwei-left">
-				<text>鏈巿鏉冨畾浣�</text>
+				<text>鏈幏鍙栧畾浣嶄俊鎭�</text>
 				<text>鎴戜滑鏃犳硶鑾峰緱鎮ㄥ綋鍓嶄綅缃俊鎭负鎮ㄦ帹鑽愰檮杩戠粡閿�鍟�</text>
 			</view>
 			<view class="dingwei-btn" @click="goToAppSetting">寮�鍚畾浣�</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++
@@ -564,9 +565,9 @@
 						display: flex;
 						align-items: center;
 						justify-content: center;
-
 						image {
-							width: 100%;
+						 	width: 100%;
+							height: 330rpx;
 						}
 					}
 
@@ -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;
@@ -618,6 +624,7 @@
 								font-weight: 400;
 								font-size: 22rpx;
 								color: #999999;
+								text-decoration: line-through;
 							}
 						}
 
@@ -674,7 +681,7 @@
 				margin-top: 40rpx;
 				.cate-list {
 					width: 100%;
-					height: 300rpx;
+					// height: 300rpx;
 					display: flex;
 					align-items: flex-start;
 					justify-content: space-between;

--
Gitblit v1.9.3