From 244caf9bc6ea35a24e1a7db61f8a2a0112ff58bb Mon Sep 17 00:00:00 2001 From: Agent Date: Thu, 26 Mar 2026 14:39:13 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dproduct/list.vue?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/product/list.vue | 39 +++----------------------------------- 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/src/pages/product/list.vue b/src/pages/product/list.vue index a70bc78..7603670 100644 --- a/src/pages/product/list.vue +++ b/src/pages/product/list.vue @@ -18,20 +18,10 @@ - + 全部 - + {{ cat.name }} @@ -39,12 +29,7 @@ - + @@ -64,14 +49,11 @@ - 暂无商品 - - {{ loading ? '加载中...' : (hasMore ? '上拉加载更多' : '没有更多了') }} @@ -119,7 +101,6 @@ export default { async loadProducts() { if (this.loading) return this.loading = true - try { const res = await productApi.getProducts({ categoryId: this.categoryId, @@ -127,7 +108,6 @@ export default { page: this.page, pageSize: this.pageSize }) - const list = res.records || [] if (this.page === 1) { this.products = list @@ -166,7 +146,6 @@ export default { background: #f8f9fa; } -/* 搜索区域 */ .search-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 30rpx 30rpx 10rpx; @@ -192,13 +171,11 @@ export default { color: #999; } -/* 左侧分类 + 右侧商品布局 */ .content-wrapper { display: flex; height: calc(100vh - 130rpx); } -/* 左侧分类侧边栏 */ .category-sidebar { width: 180rpx; background: #fff; @@ -211,7 +188,6 @@ export default { color: #666; text-align: center; border-left: 6rpx solid transparent; - transition: all 0.3s; } .category-item.active { @@ -221,13 +197,11 @@ export default { border-left-color: #667eea; } -/* 右侧商品列表 */ .product-scroll { flex: 1; background: #f8f9fa; } -/* 商品列表 */ .product-list { display: flex; flex-wrap: wrap; @@ -241,17 +215,12 @@ export default { margin-bottom: 20rpx; overflow: hidden; box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06); - transition: all 0.3s; } .product-card:nth-child(odd) { margin-right: 4%; } -.product-card:active { - transform: scale(0.98); -} - .product-image { height: 200rpx; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); @@ -325,7 +294,6 @@ export default { font-weight: bold; } -/* 空状态 */ .empty { width: 100%; padding: 100rpx 0; @@ -340,7 +308,6 @@ export default { margin-top: 20rpx; } -/* 加载更多 */ .load-more { padding: 30rpx; text-align: center;