Browse Source

修改估价页面的ui

Xfy
Trae AI 7 days ago
parent
commit
6c8923dcf0
  1. 20
      pages/evaluate2/index.wxml
  2. 289
      pages/evaluate2/index.wxss
  3. 24
      pages/evaluate2/one.wxml
  4. 135
      pages/evaluate2/one.wxss
  5. 19
      pages/evaluate2/product-list.wxml
  6. 272
      pages/evaluate2/product-list.wxss

20
pages/evaluate2/index.wxml

@ -1,10 +1,6 @@
<view class="container">
<!-- 头部导航栏 -->
<view class="header">
</view>
<view class="content" style="width: 525rpx; display: flex; box-sizing: content-box">
<view class="content">
<!-- 加载中状态 -->
<view wx:if="{{loading}}" class="loading">
<view class="loading-spinner"></view>
@ -26,11 +22,10 @@
<view class="product-info-container">
<view class="product-info-row">
<view class="product-name-container">
<text class="product-label">商品名称:</text>
<text class="product-name" style="position: relative; left: 20rpx; top: 0rpx; width: 0rpx">{{productName}}</text>
<text class="product-name">{{productName}}</text>
</view>
<button bindtap="goBackToProductList" class="btn-back" style="width: 200rpx; left: 47rpx; top: 1rpx; position: relative">
<text class="btn-back-text">更换商品</text>
<button bindtap="goBackToProductList" class="btn-change-product">
<text class="btn-change-product-text">更换商品</text>
</button>
</view>
</view>
@ -40,7 +35,7 @@
<view wx:if="{{!loading && !error && specifications.length > 0}}" class="spec-section">
<view class="section-header">
<text class="section-title">可用规格</text>
<text class="section-count">({{specifications.length}})</text>
</view>
<view class="spec-list">
<view
@ -49,14 +44,14 @@
class="spec-item"
data-spec="{{item}}"
bindtap="goToSpecDetail"
style="width: 612rpx; display: flex; box-sizing: border-box">
>
<text class="spec-name">{{item.name}}</text>
</view>
</view>
<!-- 暂无更多规格提示 -->
<view wx:if="{{specifications.length > 0}}" class="no-more">
<text class="no-more-text">暂无更多规格选择</text>
<text class="no-more-text">已经到底啦</text>
</view>
</view>
@ -64,6 +59,7 @@
<view wx:if="{{!loading && !error && specifications.length === 0}}" class="empty-state">
<view class="empty-icon">📋</view>
<text class="empty-text">该商品暂无可用规格</text>
<text class="empty-subtext">试试其他商品吧</text>
<button bindtap="goBackToProductList" class="btn-secondary">返回商品列表</button>
</view>
</view>

289
pages/evaluate2/index.wxss

@ -2,21 +2,60 @@
display: flex;
flex-direction: column;
min-height: 100vh;
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
background: linear-gradient(135deg, #F9FAFB 0%, #F2F4F8 100%);
font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}
.header {
background: #fff;
box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.08);
background: #FFFFFF;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
position: sticky;
top: 0;
z-index: 10;
}
.header-content {
padding: 30rpx 0;
text-align: center;
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 32rpx;
width: 100%;
box-sizing: border-box;
height: 100rpx;
}
.back-button {
width: 100rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 26rpx;
color: #4a90e2;
background: transparent;
border: none;
padding: 0;
margin: 0;
display: flex;
align-items: center;
justify-content: flex-start;
border-radius: 8rpx;
transition: all 0.3s ease;
}
.back-button:hover {
color: #3b82f6;
background: rgba(74, 144, 226, 0.1);
transform: translateX(-2rpx);
}
.back-icon {
margin-right: 8rpx;
font-size: 22rpx;
font-weight: 600;
}
.back-text {
font-size: 26rpx;
font-weight: 500;
}
.title {
@ -24,15 +63,24 @@
font-weight: 700;
color: #2c3e50;
letter-spacing: 2rpx;
flex: 1;
text-align: center;
margin: 0;
padding: 0;
}
.header-right {
width: 100rpx;
}
.content {
flex: 1;
padding: 16rpx;
padding: 32rpx;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
/* 加载状态 */
@ -41,7 +89,15 @@
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
z-index: 9999;
width: 100%;
box-sizing: border-box;
}
.loading-spinner {
@ -95,83 +151,80 @@
display: flex;
gap: 16rpx;
width: 100%;
max-width: 600rpx;
}
.btn-primary {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
font-size: 32rpx;
font-weight: 600;
border-radius: 40rpx;
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
color: #fff;
border: none;
box-shadow: 0 4rpx 12rpx rgba(96, 165, 250, 0.4);
box-shadow: 0 4rpx 8rpx rgba(0,122,255,0.2);
transition: all 0.3s ease;
padding: 0 48rpx;
}
.btn-primary:hover {
transform: translateY(-2rpx);
box-shadow: 0 6rpx 16rpx rgba(74, 144, 226, 0.5);
box-shadow: 0 6rpx 16rpx rgba(0,122,255,0.3);
}
.btn-secondary {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
font-size: 32rpx;
font-weight: 600;
border-radius: 40rpx;
background: #fff;
color: #4a90e2;
border: 2rpx solid #4a90e2;
color: #007AFF;
border: 1rpx solid #007AFF;
transition: all 0.3s ease;
padding: 0 48rpx;
}
.btn-secondary:hover {
background: rgba(74, 144, 226, 0.05);
background: rgba(0,122,255,0.05);
transform: translateY(-2rpx);
}
.btn-back {
.btn-change-product {
display: flex;
align-items: center;
justify-content: center;
padding: 8rpx 24rpx;
font-size: 24rpx;
color: #4a90e2;
padding: 12rpx 24rpx;
font-size: 28rpx;
color: #007AFF;
background: transparent;
border: 1rpx solid #4a90e2;
border: 1rpx solid #007AFF;
border-radius: 20rpx;
transition: all 0.3s ease;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
}
.btn-back:hover {
background: rgba(74, 144, 226, 0.1);
.btn-change-product:hover {
background: rgba(0,122,255,0.1);
transform: translateY(-2rpx);
box-shadow: 0 4rpx 12rpx rgba(74, 144, 226, 0.2);
box-shadow: 0 4rpx 12rpx rgba(0,122,255,0.2);
}
.btn-back-icon {
margin-right: 8rpx;
font-size: 20rpx;
}
.btn-back-text {
font-size: 22rpx;
.btn-change-product-text {
font-size: 28rpx;
}
/* 商品信息卡片 */
.product-card {
background: #f5f5f5;
background: #FFFFFF;
border-radius: 12rpx;
padding: 32rpx;
margin-bottom: 24rpx;
margin: 24rpx 0 32rpx;
width: 100%;
max-width: 600rpx;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.04);
transition: all 0.3s ease;
}
.product-info-container {
@ -183,7 +236,6 @@
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
width: 100%;
box-sizing: border-box;
}
@ -192,29 +244,26 @@
display: flex;
align-items: center;
flex: 1;
gap: 8rpx;
}
.product-label {
font-size: 24rpx;
color: #666;
font-weight: 500;
white-space: nowrap;
margin-right: 16rpx;
}
.product-name {
font-size: 30rpx;
font-size: 32rpx;
font-weight: 600;
color: #333;
line-height: 1.4;
word-break: break-word;
flex: 1;
text-align: center;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* 规格列表区域 */
.spec-section {
margin-top: 24rpx;
margin-top: 32rpx;
width: 100%;
}
.section-header {
@ -222,49 +271,55 @@
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
padding: 0 8rpx;
padding: 0;
width: 100%;
max-width: 600rpx;
}
.section-title {
font-size: 30rpx;
font-weight: 700;
color: #2c3e50;
font-size: 32rpx;
font-weight: 600;
color: #333;
padding-left: 16rpx;
border-left: 6rpx solid #4a90e2;
border-left: 6rpx solid #007AFF;
border-radius: 4rpx;
line-height: 32rpx;
}
.section-count {
font-size: 24rpx;
font-size: 28rpx;
color: #999;
background: rgba(74, 144, 226, 0.1);
padding: 6rpx 16rpx;
border-radius: 20rpx;
}
/* 规格列表布局 */
.spec-list {
margin-top: 16rpx;
display: flex;
flex-direction: column;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16rpx;
width: 100%;
max-width: 600rpx;
}
/* 规格项 */
.spec-item {
background: #f5f5f5;
background: #FFFFFF;
border-radius: 12rpx;
padding: 40rpx 24rpx;
padding: 32rpx 24rpx;
cursor: pointer;
min-height: 120rpx;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
max-width: 600rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
transition: all 0.3s ease;
}
.spec-item:hover {
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05);
transform: translateY(-2rpx);
}
.spec-item:active {
background: #F5F5F5;
}
.spec-name {
@ -283,19 +338,30 @@
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
padding: 120rpx 0;
text-align: center;
width: 100%;
}
.empty-icon {
font-size: 160rpx;
font-size: 120rpx;
margin-bottom: 40rpx;
opacity: 0.6;
color: #CCC;
}
.empty-text {
font-size: 32rpx;
color: #666;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
line-height: 1.4;
padding: 0 40rpx;
}
.empty-subtext {
font-size: 28rpx;
color: #999;
margin-bottom: 48rpx;
line-height: 1.4;
padding: 0 40rpx;
@ -304,23 +370,13 @@
/* 响应式设计 */
@media (max-width: 750rpx) {
.content {
padding: 20rpx;
}
.spec-grid {
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
padding: 24rpx;
}
.product-card {
padding: 28rpx;
}
.spec-card {
padding: 28rpx 20rpx;
min-height: 180rpx;
}
.title {
font-size: 32rpx;
}
@ -333,10 +389,6 @@
font-size: 28rpx;
}
.price-value {
font-size: 32rpx;
}
.button-group {
flex-direction: column;
gap: 12rpx;
@ -346,49 +398,84 @@
.btn-secondary {
width: 100%;
}
.spec-item {
padding: 28rpx 20rpx;
}
.spec-name {
font-size: 28rpx;
}
.spec-list {
grid-template-columns: repeat(2, 1fr);
gap: 16rpx;
}
}
/* 小屏幕设备适配 */
@media (max-width: 414rpx) {
.spec-grid {
grid-template-columns: repeat(3, 1fr);
gap: 12rpx;
.content {
padding: 24rpx;
}
.title {
font-size: 32rpx;
}
.spec-card {
.section-title {
font-size: 28rpx;
}
.product-name {
font-size: 26rpx;
}
.spec-item {
padding: 24rpx 16rpx;
min-height: 160rpx;
}
.spec-name {
font-size: 24rpx;
}
.price-value {
font-size: 28rpx;
.btn-change-product {
padding: 10rpx 20rpx;
}
.btn-change-product-text {
font-size: 26rpx;
}
.spec-list {
grid-template-columns: repeat(2, 1fr);
gap: 12rpx;
}
}
/* 暂无更多规格提示 */
.no-more {
display: flex;
justify-content: center;
align-items: center;
justify-content: center;
padding: 48rpx 0;
margin-top: 16rpx;
margin-bottom: 100rpx; /* 添加底部边距,避免被导航栏遮挡 */
margin-top: 32rpx;
margin-bottom: 40rpx;
width: 100%;
}
.no-more::before,
.no-more::after {
content: '';
flex: 1;
height: 1rpx;
background: #E5E5E5;
margin: 0 16rpx;
}
.no-more-text {
font-size: 24rpx;
color: #999;
background: rgba(0, 0, 0, 0.03);
padding: 12rpx 32rpx;
border-radius: 30rpx;
color: #BBB;
font-weight: 500;
}
/* 调整规格网格布局,确保不被导航栏遮挡 */
.spec-section {
margin-bottom: 40rpx;
white-space: nowrap;
}

24
pages/evaluate2/one.wxml

@ -1,10 +1,5 @@
<view class="container">
<!-- 头部导航栏 -->
<view class="header">
<view class="header-content" style="width: 740rpx; display: block; box-sizing: border-box; height: 106rpx">
<text class="title">分类选择</text>
</view>
</view>
<!-- 登录弹窗 -->
<view wx:if="{{showOneKeyLoginModal}}" class="auth-modal-overlay">
@ -29,7 +24,7 @@
</view>
</view>
<view class="content" style="width: 600rpx; display: block; box-sizing: border-box">
<view class="content">
<!-- 加载中状态 -->
<view wx:if="{{loading}}" class="loading">
<view class="loading-spinner"></view>
@ -59,11 +54,20 @@
class="category-card"
data-category="{{item}}"
bindtap="selectCategory"
style="height: 120rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx; width: 579rpx">
<view class="category-info">
<text class="category-name" style="position: relative; top: 1rpx">{{item}}</text>
>
<view class="card-content">
<text class="card-desc">点击选择此类型查看相关商品</text>
<view class="card-body">
<text class="category-name">{{item}}</text>
<view class="category-image">
<image
src="https://via.placeholder.com/120x120?text={{item}}"
mode="aspectFill"
class="category-img"
/>
</view>
</view>
</view>
</view>
</view>
</view>

135
pages/evaluate2/one.wxss

@ -7,16 +7,22 @@
}
.header {
background: #fff;
box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.08);
background: #FFFFFF;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
position: sticky;
top: 0;
z-index: 10;
}
.header-content {
padding: 30rpx 0;
padding: 24rpx 32rpx;
text-align: center;
width: 100%;
box-sizing: border-box;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
}
.title {
@ -24,11 +30,16 @@
font-weight: 700;
color: #2c3e50;
letter-spacing: 2rpx;
margin: 0;
padding: 0;
}
.content {
flex: 1;
padding: 16rpx;
padding: 32rpx;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
/* 加载状态 */
@ -37,7 +48,15 @@
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
z-index: 9999;
width: 100%;
box-sizing: border-box;
}
.loading-spinner {
@ -72,6 +91,8 @@
flex-direction: column;
align-items: center;
text-align: center;
width: 100%;
box-sizing: border-box;
}
.error-icon {
@ -91,7 +112,7 @@
display: flex;
gap: 16rpx;
width: 100%;
max-width: 600rpx;
box-sizing: border-box;
}
.btn-primary {
@ -106,6 +127,7 @@
border: none;
box-shadow: 0 4rpx 12rpx rgba(96, 165, 250, 0.4);
transition: all 0.3s ease;
box-sizing: border-box;
}
.btn-primary:hover {
@ -124,11 +146,7 @@
color: #4a90e2;
border: 2rpx solid #4a90e2;
transition: all 0.3s ease;
}
.btn-secondary:hover {
background: rgba(74, 144, 226, 0.05);
transform: translateY(-2rpx);
box-sizing: border-box;
}
.btn-back {
@ -374,71 +392,122 @@
.category-section {
margin-top: 24rpx;
margin-bottom: 40rpx;
width: 100%;
box-sizing: border-box;
}
.category-grid {
display: flex;
flex-direction: column;
gap: 20rpx;
margin-top: 16rpx;
width: 100%;
box-sizing: border-box;
}
.category-card {
background: #f5f5f5;
background: #ffffff;
border-radius: 12rpx;
padding: 40rpx 24rpx;
padding: 24rpx;
cursor: pointer;
min-height: 120rpx;
display: flex;
align-items: center;
justify-content: center;
min-height: 160rpx;
margin-bottom: 20rpx;
border: 1rpx solid #f0f0f0;
transition: all 0.3s ease;
width: 100%;
box-sizing: border-box;
}
.category-info {
flex: 1;
.category-card:hover {
transform: translateY(-2rpx);
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
border-color: #e0e0e0;
}
.card-content {
width: 100%;
}
.card-desc {
font-size: 20rpx;
color: #999999;
text-align: right;
margin-bottom: 16rpx;
line-height: 1.4;
}
.card-body {
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
}
.category-name {
font-size: 30rpx;
font-weight: 500;
color: #333;
color: #333333;
line-height: 1.4;
word-break: break-word;
text-align: center;
flex: 1;
}
.category-image {
width: 100rpx;
height: 100rpx;
border-radius: 4rpx;
overflow: hidden;
background: #f5f5f5;
border: 1rpx solid #e0e0e0;
}
.category-img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* 响应式设计 - 分类区域 */
@media (max-width: 750rpx) {
.category-grid {
gap: 16rpx;
.category-card {
padding: 20rpx;
min-height: 140rpx;
margin-bottom: 16rpx;
}
.category-card {
padding: 36rpx 20rpx;
min-height: 110rpx;
.card-desc {
font-size: 18rpx;
margin-bottom: 12rpx;
}
.category-name {
font-size: 28rpx;
}
.category-image {
width: 90rpx;
height: 90rpx;
}
}
@media (max-width: 414rpx) {
.category-grid {
gap: 12rpx;
.category-card {
padding: 16rpx;
min-height: 120rpx;
margin-bottom: 12rpx;
}
.category-card {
padding: 32rpx 16rpx;
min-height: 100rpx;
.card-desc {
font-size: 16rpx;
margin-bottom: 10rpx;
}
.category-name {
font-size: 24rpx;
}
.category-image {
width: 80rpx;
height: 80rpx;
}
}
/* 调整规格网格布局,确保不被导航栏遮挡 */

19
pages/evaluate2/product-list.wxml

@ -1,10 +1,13 @@
<view class="container">
<!-- 头部导航栏 -->
<view class="header">
<view class="header-content" style="display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; padding: 0 20rpx; width: 740rpx">
<button class="title" bindtap="goBackToCategories">返回分类</button>
<view class="header-content">
<button class="back-button" bindtap="goBackToCategories">
<text class="back-icon">←</text>
<text class="back-text">分类</text>
</button>
<text class="title">商品选择</text>
<view style="width: 120rpx;"></view> <!-- 占位,保持标题居中 -->
<view class="header-right"></view> <!-- 占位,保持标题居中 -->
</view>
</view>
@ -29,19 +32,18 @@
<!-- 当前选择的分类 -->
<view wx:if="{{category}}" class="current-category">
<view class="current-category-content">
<text class="current-category-label">当前分类:</text>
<text class="current-category-name">{{category}}</text>
</view>
<!-- 价格范围 -->
<view wx:if="{{priceRange.hasPrice}}" class="price-range">
<text class="price-range-label">价格范围:</text>
<text class="price-range-value">¥{{priceRange.min}} - ¥{{priceRange.max}}</text>
</view>
</view>
<view class="section-header">
<text class="section-title">商品列表</text>
<text class="section-count">{{productNames.length}}个商品</text>
<view class="section-count">{{productNames.length}}个商品</view>
</view>
<view class="section-divider"></view>
<!-- 有商品时显示网格 -->
<view wx:if="{{productNames.length > 0}}" class="product-grid">
@ -62,12 +64,13 @@
<text class="empty-text">
{{category ? '该分类下暂无商品' : '暂无商品'}}
</text>
<button bindtap="loadProductNames" class="btn-secondary">重新加载</button>
<text class="empty-subtext">试试其他分类吧</text>
<button bindtap="loadProductNames" class="btn-secondary">刷新</button>
</view>
<!-- 暂无更多商品提示 -->
<view wx:if="{{productNames.length > 0}}" class="no-more">
<text class="no-more-text">暂无更多商品选择</text>
<text class="no-more-text">已经到底啦</text>
</view>
</view>
</view>

272
pages/evaluate2/product-list.wxss

@ -2,7 +2,7 @@
display: flex;
flex-direction: column;
min-height: 100vh;
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
background: linear-gradient(135deg, #F9FAFB 0%, #F2F4F8 100%);
font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
overflow-x: hidden;
width: 100%;
@ -10,26 +10,29 @@
}
.header {
background: #fff;
box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.08);
background: #FFFFFF;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05);
position: sticky;
top: 0;
z-index: 10;
}
.header-content {
padding: 30rpx 0;
text-align: center;
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 32rpx;
width: 100%;
box-sizing: border-box;
height: 100rpx;
}
/* 返回按钮样式 */
.back-button {
width: 120rpx;
width: 100rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 24rpx;
font-size: 26rpx;
color: #4a90e2;
background: transparent;
border: none;
@ -37,11 +40,26 @@
margin: 0;
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
border-radius: 8rpx;
transition: all 0.3s ease;
}
.back-button:hover {
color: #3b82f6;
background: rgba(74, 144, 226, 0.1);
transform: translateX(-2rpx);
}
.back-icon {
margin-right: 8rpx;
font-size: 22rpx;
font-weight: 600;
}
.back-text {
font-size: 26rpx;
font-weight: 500;
}
.title {
@ -49,11 +67,19 @@
font-weight: 700;
color: #2c3e50;
letter-spacing: 2rpx;
flex: 1;
text-align: center;
margin: 0;
padding: 0;
}
.header-right {
width: 100rpx;
}
.content {
flex: 1;
padding: 16rpx;
padding: 32rpx;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
@ -65,7 +91,15 @@
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
z-index: 9999;
width: 100%;
box-sizing: border-box;
}
.loading-spinner {
@ -100,6 +134,8 @@
flex-direction: column;
align-items: center;
text-align: center;
width: 100%;
box-sizing: border-box;
}
.error-icon {
@ -127,6 +163,7 @@
border: none;
box-shadow: 0 4rpx 12rpx rgba(96, 165, 250, 0.4);
transition: all 0.3s ease;
box-sizing: border-box;
}
.btn-primary:hover {
@ -137,52 +174,49 @@
/* 商品列表区域 */
.product-section {
margin-top: 24rpx;
width: 100%;
box-sizing: border-box;
}
/* 当前选择的分类 */
.current-category {
display: flex;
flex-direction: column;
background: #f5f5f5;
padding: 20rpx 24rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
background: #F8F9FA;
padding: 24rpx 32rpx;
border-radius: 16rpx;
margin-bottom: 32rpx;
width: 100%;
box-sizing: border-box;
}
.current-category-content {
display: flex;
align-items: center;
margin-bottom: 12rpx;
}
.current-category-label {
font-size: 24rpx;
color: #666;
margin-right: 12rpx;
margin-bottom: 8rpx;
width: 100%;
box-sizing: border-box;
}
.current-category-name {
font-size: 26rpx;
font-size: 36rpx;
font-weight: 600;
color: #333;
width: 100%;
box-sizing: border-box;
}
/* 价格范围 */
.price-range {
display: flex;
align-items: center;
}
.price-range-label {
font-size: 24rpx;
color: #666;
margin-right: 12rpx;
width: 100%;
box-sizing: border-box;
}
.price-range-value {
font-size: 24rpx;
font-weight: 500;
color: #333;
font-size: 28rpx;
color: #666;
}
.section-header {
@ -190,31 +224,41 @@
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
padding: 0 8rpx;
padding: 0;
width: 100%;
box-sizing: border-box;
}
.section-title {
font-size: 30rpx;
font-weight: 700;
font-size: 32rpx;
font-weight: 600;
color: #2c3e50;
padding-left: 16rpx;
border-left: 6rpx solid #4a90e2;
padding-left: 0;
border-left: none;
}
.section-count {
font-size: 24rpx;
font-size: 28rpx;
color: #999;
background: rgba(74, 144, 226, 0.1);
padding: 6rpx 16rpx;
border-radius: 20rpx;
background: #F0F0F0;
padding: 8rpx 16rpx;
border-radius: 24rpx;
}
.section-divider {
height: 1rpx;
background: #EDEDED;
margin-bottom: 24rpx;
width: 100%;
box-sizing: border-box;
}
/* 商品网格布局 */
.product-grid {
display: flex;
flex-direction: column;
gap: 20rpx;
margin-top: 16rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24rpx;
margin-top: 0;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
@ -222,9 +266,9 @@
/* 商品卡片 */
.product-card {
background: #f5f5f5;
border-radius: 12rpx;
padding: 40rpx 24rpx;
background: #FFFFFF;
border-radius: 16rpx;
padding: 16rpx;
cursor: pointer;
min-height: 120rpx;
display: flex;
@ -232,30 +276,41 @@
justify-content: center;
width: 100%;
box-sizing: border-box;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.04);
transition: all 0.3s ease;
}
.product-card:hover {
box-shadow: 0 8rpx 20rpx rgba(0,0,0,0.08);
transform: translateY(-2rpx);
}
.product-name {
font-size: 30rpx;
font-size: 28rpx;
font-weight: 500;
color: #333;
line-height: 1.4;
word-break: break-word;
text-align: center;
padding: 0 8rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* 响应式设计 */
@media (max-width: 750rpx) {
.content {
padding: 20rpx;
padding: 24rpx;
}
.product-grid {
gap: 16rpx;
gap: 20rpx;
}
.product-card {
padding: 36rpx 20rpx;
padding: 16rpx;
min-height: 110rpx;
}
@ -268,42 +323,116 @@
}
.product-name {
font-size: 28rpx;
font-size: 26rpx;
}
.current-category {
padding: 20rpx 24rpx;
}
.current-category-name {
font-size: 32rpx;
}
.price-range-value {
font-size: 24rpx;
}
}
/* 小屏幕设备适配 */
@media (max-width: 414rpx) {
.content {
padding: 24rpx;
}
.product-grid {
gap: 12rpx;
gap: 20rpx;
}
.product-card {
padding: 32rpx 16rpx;
padding: 16rpx;
min-height: 100rpx;
}
.product-name {
font-size: 24rpx;
}
.title {
font-size: 32rpx;
}
.section-title {
font-size: 28rpx;
}
.current-category {
padding: 16rpx 20rpx;
}
.current-category-name {
font-size: 28rpx;
}
.price-range-value {
font-size: 22rpx;
}
}
/* 大屏幕适配 */
@media (min-width: 900px) {
.product-grid {
grid-template-columns: repeat(4, 1fr);
max-width: 1200rpx;
margin: 0 auto;
}
.current-category {
max-width: 1200rpx;
margin: 0 auto 32rpx;
}
.section-header {
max-width: 1200rpx;
margin: 0 auto 24rpx;
}
.section-divider {
max-width: 1200rpx;
margin: 0 auto 24rpx;
}
}
/* 平板适配 */
@media (min-width: 600px) and (max-width: 899px) {
.product-grid {
grid-template-columns: repeat(3, 1fr);
}
}
/* 暂无更多商品提示 */
.no-more {
display: flex;
justify-content: center;
align-items: center;
justify-content: center;
padding: 48rpx 0;
margin-top: 16rpx;
margin-top: 24rpx;
}
.no-more::before,
.no-more::after {
content: '';
flex: 1;
height: 1rpx;
background: #E5E5E5;
margin: 0 16rpx;
}
.no-more-text {
font-size: 24rpx;
color: #999;
background: rgba(0, 0, 0, 0.03);
padding: 12rpx 32rpx;
border-radius: 30rpx;
color: #BBB;
font-weight: 500;
white-space: nowrap;
}
/* 空状态 */
@ -312,19 +441,29 @@
flex-direction: column;
align-items: center;
justify-content: center;
padding: 160rpx 0;
padding: 120rpx 0;
text-align: center;
}
.empty-icon {
font-size: 160rpx;
font-size: 120rpx;
margin-bottom: 40rpx;
opacity: 0.6;
color: #CCC;
}
.empty-text {
font-size: 32rpx;
color: #666;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
line-height: 1.4;
padding: 0 40rpx;
}
.empty-subtext {
font-size: 28rpx;
color: #999;
margin-bottom: 48rpx;
line-height: 1.4;
padding: 0 40rpx;
@ -334,13 +473,14 @@
width: 200rpx;
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
font-size: 32rpx;
font-weight: 600;
border-radius: 40rpx;
border-radius: 48rpx;
background: #fff;
color: #4a90e2;
border: 2rpx solid #4a90e2;
border: 1rpx solid #4a90e2;
transition: all 0.3s ease;
padding: 0 48rpx;
}
.btn-secondary:hover {

Loading…
Cancel
Save