Browse Source

优化 evaluate2 页面布局,改为单列显示并统一样式

蛋吧eggbar
徐飞洋 1 month ago
parent
commit
f372bbc162
  1. 11
      pages/evaluate2/index.wxml
  2. 74
      pages/evaluate2/index.wxss
  3. 13
      pages/evaluate2/one.wxml
  4. 187
      pages/evaluate2/one.wxss
  5. 6
      pages/evaluate2/product-list.wxml
  6. 130
      pages/evaluate2/product-list.wxss
  7. 2
      pages/profile/authentication/index.wxml

11
pages/evaluate2/index.wxml

@ -1,12 +1,12 @@
<view class="container">
<!-- 头部导航栏 -->
<view class="header">
<view class="header-content" style="width: 4200rpx; display: block; box-sizing: border-box; height: 124rpx">
<view class="header-content" style="display: block; box-sizing: border-box; height: 124rpx; width: 740rpx">
<text class="title">规格选择</text>
</view>
</view>
<view class="content" style="width: 512rpx; height: 2089rpx; display: block; box-sizing: border-box">
<view class="content" style="width: 612rpx; height: 1622rpx; display: block; box-sizing: border-box">
<!-- 加载中状态 -->
<view wx:if="{{loading}}" class="loading">
<view class="loading-spinner"></view>
@ -24,7 +24,7 @@
</view>
<!-- 商品信息 -->
<view wx:else class="product-card">
<view wx:else class="product-card" style="display: block; box-sizing: border-box; width: 525rpx">
<view class="product-info-container">
<view class="product-info-row">
<text class="product-label">商品名称</text>
@ -39,7 +39,7 @@
<!-- 规格列表 -->
<view wx:if="{{!loading && !error && specifications.length > 0}}" class="spec-section">
<view class="section-header">
<view class="section-header" style="width: 525rpx; display: flex; box-sizing: border-box; left: 0rpx; top: 0rpx">
<text class="section-title">可用规格</text>
<text class="section-count">{{specifications.length}}个</text>
</view>
@ -50,9 +50,8 @@
class="spec-item"
data-spec="{{item}}"
bindtap="goToSpecDetail"
>
style="width: 525rpx; height: 90rpx; display: flex; box-sizing: border-box">
<text class="spec-name">{{item.name}}</text>
<view class="spec-arrow">→</view>
</view>
</view>

74
pages/evaluate2/index.wxss

@ -162,13 +162,10 @@
/* 商品信息卡片 */
.product-card {
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
background: #f5f5f5;
border-radius: 12rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 6rpx 20rpx rgba(0,0,0,0.08);
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
}
.product-info-container {
@ -193,14 +190,14 @@
}
.product-name {
font-size: 32rpx;
font-weight: 700;
color: #2c3e50;
font-size: 30rpx;
font-weight: 600;
color: #333;
line-height: 1.4;
word-break: break-word;
margin-top: 12rpx;
padding: 12rpx 0;
border-top: 1rpx solid #f1f5f9;
border-top: 1rpx solid #e0e0e0;
}
/* 规格列表区域 */
@ -242,63 +239,24 @@
/* 规格项 */
.spec-item {
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 32rpx 24rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.08);
transition: all 0.3s ease;
background: #f5f5f5;
border-radius: 12rpx;
padding: 40rpx 24rpx;
cursor: pointer;
position: relative;
overflow: hidden;
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
min-height: 120rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.spec-item::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 6rpx;
height: 100%;
background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}
.spec-item:hover {
transform: translateY(-4rpx);
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.12);
background: rgba(255, 255, 255, 1);
}
.spec-item:active {
transform: translateY(-2rpx);
box-shadow: 0 6rpx 20rpx rgba(0,0,0,0.1);
justify-content: center;
}
.spec-name {
font-size: 28rpx;
font-weight: 600;
color: #2c3e50;
font-size: 30rpx;
font-weight: 500;
color: #333;
line-height: 1.4;
word-break: break-word;
flex: 1;
padding-right: 40rpx;
}
.spec-arrow {
font-size: 32rpx;
color: #4a90e2;
font-weight: bold;
opacity: 0.6;
transition: all 0.3s ease;
}
.spec-item:hover .spec-arrow {
opacity: 1;
transform: translateX(4rpx);
text-align: center;
padding: 0 8rpx;
}
/* 空状态 */

13
pages/evaluate2/one.wxml

@ -1,7 +1,7 @@
<view class="container">
<!-- 头部导航栏 -->
<view class="header">
<view class="header-content" style="width: 600rpx; display: block; box-sizing: border-box; height: 106rpx">
<view class="header-content" style="width: 740rpx; display: block; box-sizing: border-box; height: 106rpx">
<text class="title">分类选择</text>
</view>
</view>
@ -59,11 +59,11 @@
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">{{item}}</text>
<text class="category-name" style="position: relative; top: 1rpx">{{item}}</text>
</view>
<view class="category-arrow">→</view>
</view>
</view>
</view>
@ -99,11 +99,6 @@
<view class="spec-info">
<text class="spec-name">{{item.name}}</text>
</view>
<view class="spec-price">
<text class="price-label">参考价格</text>
<text class="price-value">¥{{item.finalPriceText}}</text>
</view>
<view class="spec-arrow">→</view>
</view>
</view>

187
pages/evaluate2/one.wxss

@ -234,103 +234,39 @@
/* 规格网格布局 */
.spec-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
display: flex;
flex-direction: column;
gap: 16rpx;
margin-top: 16rpx;
}
/* 规格卡片 */
.spec-card {
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 32rpx 24rpx;
box-shadow: 0 6rpx 20rpx rgba(0,0,0,0.08);
transition: all 0.3s ease;
background: #f5f5f5;
border-radius: 12rpx;
padding: 40rpx 24rpx;
cursor: pointer;
position: relative;
overflow: hidden;
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
min-height: 200rpx;
min-height: 120rpx;
display: flex;
flex-direction: column;
}
.spec-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 6rpx;
height: 100%;
background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}
.spec-card:hover {
transform: translateY(-6rpx);
box-shadow: 0 12rpx 32rpx rgba(0,0,0,0.15);
background: rgba(255, 255, 255, 1);
}
.spec-card:active {
transform: translateY(-2rpx);
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.12);
align-items: center;
justify-content: center;
}
.spec-info {
margin-bottom: 20rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.spec-name {
font-size: 28rpx;
font-weight: 600;
color: #2c3e50;
font-size: 30rpx;
font-weight: 500;
color: #333;
line-height: 1.4;
word-break: break-word;
padding-right: 40rpx;
}
.spec-price {
display: flex;
flex-direction: column;
margin-top: 16rpx;
}
.price-label {
font-size: 20rpx;
color: #999;
margin-bottom: 4rpx;
}
.price-value {
font-size: 36rpx;
font-weight: 700;
color: #e74c3c;
transition: all 0.3s ease;
}
.spec-card:hover .price-value {
transform: scale(1.05);
}
.spec-arrow {
position: absolute;
top: 32rpx;
right: 28rpx;
font-size: 32rpx;
color: #4a90e2;
font-weight: bold;
opacity: 0.6;
transition: all 0.3s ease;
}
.spec-card:hover .spec-arrow {
opacity: 1;
transform: translateX(4rpx);
text-align: center;
padding-right: 0;
}
/* 空状态 */
@ -364,7 +300,6 @@
}
.spec-grid {
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
}
@ -373,8 +308,8 @@
}
.spec-card {
padding: 28rpx 20rpx;
min-height: 180rpx;
padding: 36rpx 20rpx;
min-height: 110rpx;
}
.title {
@ -389,10 +324,6 @@
font-size: 28rpx;
}
.price-value {
font-size: 32rpx;
}
.button-group {
flex-direction: column;
gap: 12rpx;
@ -407,22 +338,17 @@
/* 小屏幕设备适配 */
@media (max-width: 414rpx) {
.spec-grid {
grid-template-columns: repeat(3, 1fr);
gap: 12rpx;
}
.spec-card {
padding: 24rpx 16rpx;
min-height: 160rpx;
padding: 32rpx 16rpx;
min-height: 100rpx;
}
.spec-name {
font-size: 24rpx;
}
.price-value {
font-size: 28rpx;
}
}
/* 暂无更多规格提示 */
@ -451,86 +377,48 @@
}
.category-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
display: flex;
flex-direction: column;
gap: 20rpx;
margin-top: 16rpx;
}
.category-card {
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 32rpx 24rpx;
box-shadow: 0 6rpx 20rpx rgba(0,0,0,0.08);
transition: all 0.3s ease;
background: #f5f5f5;
border-radius: 12rpx;
padding: 40rpx 24rpx;
cursor: pointer;
position: relative;
overflow: hidden;
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
min-height: 150rpx;
min-height: 120rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.category-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 6rpx;
height: 100%;
background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}
.category-card:hover {
transform: translateY(-6rpx);
box-shadow: 0 12rpx 32rpx rgba(0,0,0,0.15);
background: rgba(255, 255, 255, 1);
}
.category-card:active {
transform: translateY(-2rpx);
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.12);
justify-content: center;
}
.category-info {
flex: 1;
margin-right: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.category-name {
font-size: 32rpx;
font-weight: 600;
color: #2c3e50;
font-size: 30rpx;
font-weight: 500;
color: #333;
line-height: 1.4;
word-break: break-word;
}
.category-arrow {
font-size: 32rpx;
color: #4a90e2;
font-weight: bold;
opacity: 0.6;
transition: all 0.3s ease;
}
.category-card:hover .category-arrow {
opacity: 1;
transform: translateX(4rpx);
text-align: center;
}
/* 响应式设计 - 分类区域 */
@media (max-width: 750rpx) {
.category-grid {
grid-template-columns: repeat(2, 1fr);
gap: 16rpx;
}
.category-card {
padding: 28rpx 20rpx;
min-height: 130rpx;
padding: 36rpx 20rpx;
min-height: 110rpx;
}
.category-name {
@ -540,13 +428,12 @@
@media (max-width: 414rpx) {
.category-grid {
grid-template-columns: 1fr;
gap: 12rpx;
}
.category-card {
padding: 24rpx 16rpx;
min-height: 110rpx;
padding: 32rpx 16rpx;
min-height: 100rpx;
}
.category-name {

6
pages/evaluate2/product-list.wxml

@ -1,7 +1,7 @@
<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;">
<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>
<text class="title">商品选择</text>
<view style="width: 120rpx;"></view> <!-- 占位,保持标题居中 -->
@ -28,8 +28,10 @@
<view wx:else class="product-section">
<!-- 当前选择的分类 -->
<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>
@ -50,9 +52,7 @@
data-product="{{item}}"
bindtap="selectProduct"
>
<view class="product-icon">🛍️</view>
<text class="product-name">{{item}}</text>
<view class="product-arrow">→</view>
</view>
</view>

130
pages/evaluate2/product-list.wxss

@ -142,43 +142,47 @@
/* 当前选择的分类 */
.current-category {
display: flex;
align-items: center;
background: rgba(74, 144, 226, 0.1);
padding: 16rpx 20rpx;
flex-direction: column;
background: #f5f5f5;
padding: 20rpx 24rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
border-left: 6rpx solid #4a90e2;
}
.current-category-content {
display: flex;
align-items: center;
margin-bottom: 12rpx;
}
.current-category-label {
font-size: 24rpx;
color: #666;
margin-right: 8rpx;
margin-right: 12rpx;
}
.current-category-name {
font-size: 26rpx;
font-weight: 600;
color: #4a90e2;
color: #333;
}
/* 价格范围 */
.price-range {
margin-top: 8rpx;
display: flex;
align-items: center;
}
.price-range-label {
font-size: 22rpx;
font-size: 24rpx;
color: #666;
margin-right: 8rpx;
margin-right: 12rpx;
}
.price-range-value {
font-size: 22rpx;
font-size: 24rpx;
font-weight: 500;
color: #ff6b81;
color: #333;
}
.section-header {
@ -207,8 +211,8 @@
/* 商品网格布局 */
.product-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
display: flex;
flex-direction: column;
gap: 20rpx;
margin-top: 16rpx;
width: 100%;
@ -218,88 +222,28 @@
/* 商品卡片 */
.product-card {
background: rgba(255, 255, 255, 0.95);
border-radius: 20rpx;
padding: 32rpx 24rpx;
box-shadow: 0 6rpx 20rpx rgba(0,0,0,0.08);
transition: all 0.3s ease;
background: #f5f5f5;
border-radius: 12rpx;
padding: 40rpx 24rpx;
cursor: pointer;
position: relative;
overflow: hidden;
min-height: 120rpx;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
min-height: 180rpx;
backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(255, 255, 255, 0.3);
justify-content: center;
width: 100%;
box-sizing: border-box;
}
.product-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 6rpx;
background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
}
.product-card:hover {
transform: translateY(-6rpx);
box-shadow: 0 12rpx 32rpx rgba(0,0,0,0.15);
background: rgba(255, 255, 255, 1);
}
.product-card:active {
transform: translateY(-2rpx);
box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.12);
}
.product-icon {
font-size: 72rpx;
margin-bottom: 20rpx;
opacity: 0.9;
transition: all 0.3s ease;
}
.product-card:hover .product-icon {
transform: scale(1.1);
opacity: 1;
}
.product-name {
font-size: 28rpx;
font-weight: 600;
color: #2c3e50;
font-size: 30rpx;
font-weight: 500;
color: #333;
line-height: 1.4;
word-break: break-word;
margin-bottom: 20rpx;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
padding: 0 8rpx;
}
.product-arrow {
position: absolute;
bottom: 20rpx;
right: 24rpx;
font-size: 28rpx;
color: #4a90e2;
font-weight: bold;
opacity: 0.6;
transition: all 0.3s ease;
}
.product-card:hover .product-arrow {
opacity: 1;
transform: translateX(4rpx);
}
/* 响应式设计 */
@media (max-width: 750rpx) {
.content {
@ -307,13 +251,12 @@
}
.product-grid {
grid-template-columns: repeat(3, 1fr);
gap: 16rpx;
}
.product-card {
padding: 28rpx 20rpx;
min-height: 160rpx;
padding: 36rpx 20rpx;
min-height: 110rpx;
}
.title {
@ -325,32 +268,23 @@
}
.product-name {
font-size: 24rpx;
}
.product-icon {
font-size: 60rpx;
font-size: 28rpx;
}
}
/* 小屏幕设备适配 */
@media (max-width: 414rpx) {
.product-grid {
grid-template-columns: repeat(3, 1fr);
gap: 12rpx;
}
.product-card {
padding: 20rpx 16rpx;
min-height: 140rpx;
padding: 32rpx 16rpx;
min-height: 100rpx;
}
.product-name {
font-size: 22rpx;
}
.product-icon {
font-size: 50rpx;
font-size: 24rpx;
}
}

2
pages/profile/authentication/index.wxml

@ -73,6 +73,6 @@
<!-- 认证按钮 -->
<view class="auth-btn" bindtap="submitAuth">
<text class="auth-btn-text">提交审核</text>
<text class="auth-btn-text">{{idcardstatus === '' || idcardstatus === 0 ? '提交' : '重新提交'}}</text>
</view>
</view>
Loading…
Cancel
Save