User 4 days ago
parent
commit
64e1b8cded
  1. 20
      pages/compare_price/index.wxml
  2. 51
      pages/compare_price/index.wxss
  3. 8
      pages/index/index.wxml
  4. 8
      pages/index/index.wxss

20
pages/compare_price/index.wxml

@ -48,14 +48,15 @@
<view class="goods-header">
<view class="brand-tag">{{currentGoods.category || '品种'}}</view>
<text class="goods-name">{{currentGoods.productName || currentGoods.name || '商品'}}</text>
<view class="status-badge" style="color: {{currentGoods.status === 'published' ? '#10B981' : '#666666'}}">{{currentGoods.status === 'published' ? '在售' : currentGoods.status === 'sold_out' ? '售罄' : '未知'}}</view>
<view class="status-badge" style="color: {{currentGoods.status === 'published' ? '#10B981' : currentGoods.status === 'sold_out' ? '#FF4D4F' : '#666666'}}">{{currentGoods.status === 'published' ? '在售' : currentGoods.status === 'sold_out' ? '售罄' : '未知'}}</view>
<view class="price-container">
<text class="currency-symbol" style="color: {{currentGoods.priceDiff > 0 ? '#FF4D4F' : currentGoods.priceDiff < 0 ? '#10B981' : '#666666'}}">¥</text>
<text class="price-amount" style="color: {{currentGoods.priceDiff > 0 ? '#FF4D4F' : currentGoods.priceDiff < 0 ? '#10B981' : '#666666'}}">{{currentGoods.price}}</text>
<text wx:if="{{currentGoods.unitPrice}}" class="unit-price">件价: ¥{{currentGoods.unitPrice}}</text>
<text class="price-amount" style="color: {{currentGoods.priceDiff > 0 ? '#FF4D4F' : currentGoods.priceDiff < 0 ? '#10B981' : '#666666'}}">{{currentGoods.price}}元{{currentGoods.price > 10 ? '' : '/'}}</text>
<text wx:if="{{currentGoods.unitPrice}}" class="unit-price">
{{currentGoods.unitPrice}}元(件价)
</text>
</view>
</view>
<text class="spec-info">{{currentGoods.specification || selectedSpec || '净重43-44g'}} | {{currentGoods.category || '绿壳'}} | 库存:{{currentGoods.totalStock || '450'}}</text>
<text class="spec-info">{{currentGoods.specification || selectedSpec || '净重43-44g'}} | {{currentGoods.category || '绿壳'}} | {{currentGoods.yolk || '蛋黄颜色'}} | 库存:{{currentGoods.totalStock || '450'}}</text>
<view class="merchant-info">
<view class="merchant-left">
<text class="merchant-icon">🏪</text>
@ -90,11 +91,12 @@
<view class="compare-item-header">
<view class="brand-tag">{{item.category || '品种'}}</view>
<text class="compare-item-name">{{item.productName || item.name}}</text>
<view class="status-badge" style="color: {{item.status === 'published' ? '#10B981' : '#666666'}}">{{item.status === 'published' ? '在售' : item.status === 'sold_out' ? '售罄' : '未知'}}</view>
<view class="status-badge" style="color: {{item.status === 'published' ? '#10B981' : item.status === 'sold_out' ? '#FF4D4F' : '#666666'}}">{{item.status === 'published' ? '在售' : item.status === 'sold_out' ? '售罄' : '未知'}}</view>
<view class="compare-item-price">
<text class="currency-symbol" style="color: {{item.priceDiff > 0 ? '#FF4D4F' : item.priceDiff < 0 ? '#10B981' : '#666666'}}">¥</text>
<text class="compare-price-amount" style="color: {{item.priceDiff > 0 ? '#FF4D4F' : item.priceDiff < 0 ? '#10B981' : '#666666'}}">{{item.price}}</text>
<text wx:if="{{item.unitPrice}}" class="unit-price">件价: ¥{{item.unitPrice}}</text>
<text class="compare-price-amount" style="color: {{item.priceDiff > 0 ? '#FF4D4F' : item.priceDiff < 0 ? '#10B981' : '#666666'}}">{{item.price}}元{{item.price > 10 ? '' : '/'}}</text>
<text wx:if="{{item.unitPrice}}" class="unit-price">
{{item.unitPrice}}元(件价)
</text>
</view>
</view>
<text class="compare-item-spec">{{item.currentSpec || item.specification || (item.processedSpecs && item.processedSpecs.length > 0 ? item.processedSpecs.join(' | ') : '净重:45-50g')}} | {{item.category || '品种'}} | {{item.yolk || '无'}} | 库存:{{item.totalStock || '450'}}</text>

51
pages/compare_price/index.wxss

@ -345,10 +345,20 @@
}
.price-container {
display: flex;
align-items: baseline;
gap: 4px;
display: block;
flex-shrink: 0;
position: relative;
}
.price-amount {
display: block;
margin-bottom: -5px;
}
.unit-price {
display: block;
margin-left: 10px;
margin-top: -5px;
}
.currency-symbol {
@ -361,9 +371,8 @@
}
.unit-price {
font-size: 12px;
font-size: 16px;
color: #666666;
margin-left: 8px;
white-space: nowrap;
}
@ -437,7 +446,7 @@
}
.compare-item-name {
font-size: 15px;
font-size: 16px;
color: #1A1A1A;
font-weight: 500;
flex: 1;
@ -448,20 +457,30 @@
}
.compare-item-price {
display: flex;
align-items: baseline;
gap: 4px;
display: block;
flex-shrink: 0;
position: relative;
}
.compare-price-amount {
font-size: 18px;
display: block;
margin-bottom: -5px;
}
.compare-item-price .unit-price {
display: block;
margin-left: 10px;
margin-top: -5px;
}
.compare-price-amount {
font-size: 24px;
font-weight: bold;
}
.compare-item-spec {
font-size: 12px;
color: #999999;
font-size: 14px;
color: #666666;
white-space: normal;
word-break: break-word;
margin-top: 4px;
@ -481,13 +500,13 @@
}
.compare-item-merchant {
font-size: 12px;
color: #999999;
font-size: 14px;
color: #666666;
}
.compare-item-region {
font-size: 12px;
color: #999999;
font-size: 14px;
color: #666666;
}
.price-comparison {

8
pages/index/index.wxml

@ -214,14 +214,14 @@
<text class="function-btn-icon">📣</text>
<text class="function-btn-text">招商</text>
</view>
<view class="function-btn" bindtap="navigateToCompany">
<text class="function-btn-icon">📄</text>
<text class="function-btn-text">我们</text>
</view>
<view class="function-btn" bindtap="navigateToFreightCalculator" wx:if="{{isInPersonnel}}">
<text class="function-btn-icon">🚚</text>
<text class="function-btn-text">运费估算</text>
</view>
<view class="function-btn" bindtap="navigateToCompany">
<text class="function-btn-icon">📄</text>
<text class="function-btn-text">我们</text>
</view>
</view>
<!-- 添加桌面引导框 -->

8
pages/index/index.wxss

@ -96,16 +96,15 @@ page {
/* 功能按钮样式 */
.function-buttons {
display: flex;
justify-content: space-around;
align-items: center;
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 10rpx;
padding: 10rpx 20rpx;
width: 100%;
max-width: 850rpx;
box-sizing: border-box;
background: #ffffff;
margin: 0 auto 16rpx;
gap: 5rpx;
border-radius: 12rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
position: relative;
@ -113,7 +112,6 @@ page {
}
.function-btn {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;

Loading…
Cancel
Save