Browse Source

merge: 合并New2分支代码到Xfy分支

- 整合New2的认证状态标签样式
- 保留Xfy的广告位功能
- 解决商品卡片显示冲突
pull/1/head
徐飞洋 2 months ago
parent
commit
add12039ff
  1. 11
      pages/buyer/index.wxml
  2. 72
      pages/buyer/index.wxss
  3. 21
      pages/index/index.wxml
  4. 73
      pages/index/index.wxss

11
pages/buyer/index.wxml

@ -1,8 +1,9 @@
<view class="container" style="align-items: flex-start; padding: 20rpx; width: 100%; max-width: 100vw; overflow-x: hidden; position: relative; box-sizing: border-box;">
<!-- 搜索框 -->
<!-- 搜索区域 -->
<view class="search-section">
<view class="search-bar">
<view class="search-container">
<view class="search-icon">🔍</view>
<view class="search-input-wrapper">
<text class="search-icon">🔍</text>
<input
class="search-input"
placeholder="输入商品名称或品种"
@ -10,7 +11,9 @@
bindconfirm="searchGoods"
value="{{searchKeyword}}"
/>
<view wx:if="{{searchKeyword}}" class="clear-icon" bindtap="clearSearch">✘</view>
<view wx:if="{{searchKeyword}}" class="clear-icon" bindtap="clearSearch">✕</view>
</view>
<button class="search-button" bindtap="searchGoods">搜索</button>
</view>
</view>

72
pages/buyer/index.wxss

@ -19,6 +19,78 @@ page {
margin: 0;
}
/* 搜索区域样式 */
.search-section {
width: 100%;
margin: 0 20rpx 20rpx 20rpx;
flex: 0 1 auto;
box-sizing: border-box;
}
.search-bar {
display: flex;
align-items: center;
gap: 10rpx;
width: 100%;
background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
padding: 6rpx;
border-radius: 50rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.12);
box-sizing: border-box;
border: 1rpx solid rgba(22, 119, 255, 0.2);
}
.search-input-wrapper {
flex: 1;
display: flex;
align-items: center;
position: relative;
background-color: white;
border-radius: 40rpx;
padding: 0 10rpx;
}
.search-icon {
margin: 0 10rpx;
font-size: 28rpx;
color: #999;
transition: all 0.3s ease;
}
.search-input {
flex: 1;
height: 70rpx;
font-size: 28rpx;
color: #333;
border: none;
outline: none;
background: transparent;
}
.search-placeholder {
color: #999;
}
.clear-icon {
font-size: 32rpx;
color: #999;
padding: 10rpx 20rpx;
}
.search-button {
background-color: #1677ff;
color: white;
border: none;
border-radius: 40rpx;
padding: 12rpx 16rpx;
font-size: 22rpx;
font-weight: bold;
white-space: nowrap;
box-shadow: 0 2rpx 8rpx rgba(22, 119, 255, 0.3);
min-width: 100rpx;
text-align: center;
}
/* 搜索框样式 */
.search-bar {
width: 100%;

21
pages/index/index.wxml

@ -210,15 +210,14 @@
<view wx:if="{{item.supplyStatus === '预售'}}" class="promo-tag presale">预售</view>
<view wx:if="{{item.sourceType}}" class="promo-tag source">一手货源</view>
</view>
<<<<<<< HEAD
<view class="product-info">
<view class="product-title">{{item.name}}</view>
<view class="product-spec">{{item.specification || '无'}}<text wx:if="{{item.yolk && item.yolk !== '无'}}"> | {{item.yolk}}</text></view>
<view class="product-price-row">
<view class="price-wrapper">
<text class="price-unit">¥</text>
<text class="price-value">{{item.price || item.minPrice || '--'}}</text>
<text class="price-unit" wx:if="{{item.unit}}">/{{item.unit}}</text>
</view>
<view class="product-status-row">
<view class="status-tag supply-{{item.supplyStatus === '预售' ? 'presale' : 'spot'}}">{{item.supplyStatus || ''}}</view>
<view class="status-tag source-{{item.sourceType === '三方认证' ? 'third' : (item.sourceType === '平台货源' ? 'platform' : 'unverified')}}">{{item.sourceType || ''}}</view>
<view class="status-tag negotiate-{{item.negotiateStatus === '可议价' ? 'yes' : 'no'}}">{{item.negotiateStatus}}</view>
</view>
<view class="product-meta">
<text class="sales-count">已售{{item.sales || item.reservedCount || 0}}件</text>
@ -274,12 +273,10 @@
<view class="product-info">
<view class="product-title">{{item.name}}</view>
<view class="product-spec">{{item.specification || '无'}}<text wx:if="{{item.yolk && item.yolk !== '无'}}"> | {{item.yolk}}</text></view>
<view class="product-price-row">
<view class="price-wrapper">
<text class="price-unit">¥</text>
<text class="price-value">{{item.price || item.minPrice || '--'}}</text>
<text class="price-unit" wx:if="{{item.unit}}">/{{item.unit}}</text>
</view>
<view class="product-status-row">
<view class="status-tag supply-{{item.supplyStatus === '预售' ? 'presale' : 'spot'}}">{{item.supplyStatus || ''}}</view>
<view class="status-tag source-{{item.sourceType === '三方认证' ? 'third' : (item.sourceType === '平台货源' ? 'platform' : 'unverified')}}">{{item.sourceType || ''}}</view>
<view class="status-tag negotiate-{{item.negotiateStatus === '可议价' ? 'yes' : 'no'}}">{{item.negotiateStatus}}</view>
</view>
<view class="product-meta">
<text class="sales-count">已售{{item.sales || item.reservedCount || 0}}件</text>

73
pages/index/index.wxss

@ -42,12 +42,14 @@ page {
align-items: center;
gap: 10rpx;
width: 100%;
background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
background: rgba(255, 255, 255, 0.6);
backdrop-filter: blur(10rpx);
-webkit-backdrop-filter: blur(10rpx);
padding: 6rpx;
border-radius: 50rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.12);
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
box-sizing: border-box;
border: 1rpx solid rgba(22, 119, 255, 0.2);
border: 1rpx solid rgba(255, 255, 255, 0.5);
}
.search-input-wrapper {
@ -55,7 +57,7 @@ page {
display: flex;
align-items: center;
position: relative;
background-color: white;
background-color: transparent;
border-radius: 40rpx;
padding: 0 10rpx;
}
@ -112,12 +114,20 @@ page {
background-color: #1677ff;
color: white;
border: none;
border-radius: 40rpx;
padding: 15rpx 30rpx;
font-size: 24rpx;
border-radius: 20rpx;
padding: 20rpx 4rpx;
font-size: 20rpx;
font-weight: bold;
white-space: nowrap;
box-shadow: 0 2rpx 8rpx rgba(22, 119, 255, 0.3);
min-width: 10rpx;
text-align: center;
}
wx-button:not([size=mini]) {
margin-left: auto;
margin-right: auto;
width: 90px;
}
/* 地区选择器弹窗样式 */
@ -656,9 +666,12 @@ page {
}
.status-tag.negotiate-yes {
background: rgba(114, 46, 209, 0.15);
color: #722ed1;
border: 1rpx solid rgba(114, 46, 209, 0.5);
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(8rpx);
-webkit-backdrop-filter: blur(8rpx);
border: 1rpx solid rgba(200, 200, 200, 0.5);
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.08);
color: #000000;
}
.status-tag.source-yes {
@ -673,6 +686,24 @@ page {
border: 1rpx solid rgba(180, 180, 180, 0.5);
}
.status-tag.source-third {
background: rgba(24, 144, 255, 0.15);
color: #096dd9;
border: 1rpx solid rgba(24, 144, 255, 0.5);
}
.status-tag.source-platform {
background: rgba(82, 196, 26, 0.15);
color: #389e0d;
border: 1rpx solid rgba(82, 196, 26, 0.5);
}
.status-tag.source-unverified {
background: rgba(140, 140, 140, 0.15);
color: #595959;
border: 1rpx solid rgba(140, 140, 140, 0.5);
}
.goods-footer {
display: flex;
justify-content: space-between;
@ -685,23 +716,23 @@ page {
}
.goods-region-bg {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(4rpx);
-webkit-backdrop-filter: blur(4rpx);
border-radius: 4rpx;
padding: 4rpx 12rpx;
border: 1.5rpx solid #1e3a6e;
box-shadow: 0 1rpx 3rpx rgba(30, 58, 110, 0.08);
background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(8rpx);
-webkit-backdrop-filter: blur(8rpx);
border-radius: 8rpx;
padding: 6rpx 14rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
border: none;
}
.goods-region {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #1e3a6e;
font-weight: 600;
font-size: 23rpx;
letter-spacing: 0.5rpx;
padding: 4rpx 10rpx;
background: linear-gradient(135deg, rgba(22, 119, 255, 0.08) 0%, rgba(64, 150, 255, 0.05) 100%);
border-radius: 12rpx;
font-size: 18rpx;
}
.goods-reserved {

Loading…
Cancel
Save