|
|
|
@ -4,13 +4,21 @@ |
|
|
|
<image src="../../images/background.png" mode="aspectFill" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></image> |
|
|
|
<scroll-view style="position: relative; z-index: 10; width: 100%; height: 100%;" scroll-y="true" enable-back-to-top="true"> |
|
|
|
<view style="width: 100%; display: flex; flex-direction: column; align-items: center; padding: 20rpx; padding-bottom: 100rpx;"> |
|
|
|
<view style="background-color: rgba(255, 255, 255, 0.8); border-radius: 10rpx; padding: 20rpx; margin-bottom: 20rpx;"> |
|
|
|
<text style="font-size: 32rpx; font-weight: bold; color: #333; text-align: center;">请选择想要了解的商品</text> |
|
|
|
<!-- 类别选择区域 --> |
|
|
|
<view wx:if="{{!selectedOption}}"> |
|
|
|
<view style="background-color: rgba(255, 255, 255, 0.8); border-radius: 10rpx; padding: 20rpx; margin-bottom: 20rpx;"> |
|
|
|
<text style="font-size: 32rpx; font-weight: bold; color: #333; text-align: center;">请选择想要了解的商品</text> |
|
|
|
</view> |
|
|
|
<view style="display: flex; flex-direction: column; gap: 20rpx; width: 100%; max-width: 400rpx;"> |
|
|
|
<button style="background-color: rgba(255, 255, 255, 0.8); color: #333; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx;" bindtap="selectOption" data-option="绿壳">绿壳</button> |
|
|
|
<button style="background-color: rgba(255, 255, 255, 0.8); color: #333; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx;" bindtap="selectOption" data-option="粉壳">粉壳</button> |
|
|
|
<button style="background-color: rgba(255, 255, 255, 0.8); color: #333; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx;" bindtap="selectOption" data-option="褐壳">褐壳</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="display: flex; flex-direction: column; gap: 20rpx; width: 100%; max-width: 400rpx;"> |
|
|
|
<button style="background-color: rgba(255, 255, 255, 0.8); color: #333; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx;" bindtap="selectOption" data-option="绿壳">绿壳</button> |
|
|
|
<button style="background-color: rgba(255, 255, 255, 0.8); color: #333; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx;" bindtap="selectOption" data-option="粉壳">粉壳</button> |
|
|
|
<button style="background-color: rgba(255, 255, 255, 0.8); color: #333; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx;" bindtap="selectOption" data-option="褐壳">褐壳</button> |
|
|
|
|
|
|
|
<!-- 返回按钮(选择后显示) --> |
|
|
|
<view wx:else style="margin-bottom: 20rpx; width: 100%; max-width: 400rpx;"> |
|
|
|
<button style="background-color: rgba(255, 255, 255, 0.8); color: #333; border-radius: 8rpx; padding: 20rpx; font-size: 28rpx;" bindtap="resetSelection">返回选择</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 商品列表 --> |
|
|
|
@ -21,7 +29,7 @@ |
|
|
|
<view wx:else> |
|
|
|
<view wx:if="{{goods.length > 0}}" style="margin-top: 40rpx; width: 100%; max-width: 750rpx;"> |
|
|
|
<view style="background-color: rgba(255, 255, 255, 0.8); border-radius: 10rpx; padding: 20rpx; margin-bottom: 20rpx;"> |
|
|
|
<text style="font-size: 28rpx; font-weight: bold; color: #333; text-align: center; display: block;">{{selectedOption}}商品列表</text> |
|
|
|
<text style="font-size: 28rpx; font-weight: bold; color: #333; text-align: center; display: block;">{{selectedOption}}在售商品</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 商品卡片列表 --> |
|
|
|
@ -33,6 +41,7 @@ |
|
|
|
wx:key="id" |
|
|
|
wx:if="{{index % 2 === 0}}" |
|
|
|
data-item="{{item}}" |
|
|
|
bindtap="navigateToGoodsDetail" |
|
|
|
> |
|
|
|
<view class="product-card {{item.status === 'sold_out' ? 'sold-out-grayscale' : ''}}" style="position: relative; background-color: rgba(255, 255, 255, 0.8); border-radius: 16rpx; overflow: hidden;"> |
|
|
|
<!-- 售空商品白色覆盖层 --> |
|
|
|
@ -94,6 +103,7 @@ |
|
|
|
wx:key="id" |
|
|
|
wx:if="{{index % 2 === 1}}" |
|
|
|
data-item="{{item}}" |
|
|
|
bindtap="navigateToGoodsDetail" |
|
|
|
> |
|
|
|
<view class="product-card {{item.status === 'sold_out' ? 'sold-out-grayscale' : ''}}" style="position: relative; background-color: rgba(255, 255, 255, 0.8); border-radius: 16rpx; overflow: hidden;"> |
|
|
|
<!-- 售空商品白色覆盖层 --> |
|
|
|
@ -152,7 +162,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view wx:else style="margin-top: 40rpx; color: #fff; text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.5);"> |
|
|
|
<text>暂无商品数据</text> |
|
|
|
<text>暂无在售数据</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -160,8 +170,11 @@ |
|
|
|
<!-- 透明弹窗提示 --> |
|
|
|
<view wx:if="{{showTips}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: rgba(0, 0, 0, 0.3); display: flex; justify-content: center; align-items: center;"> |
|
|
|
<view style="background-color: rgba(255, 255, 255, 0.9); border-radius: 16rpx; padding: 40rpx; width: 80%; max-width: 500rpx; text-align: center;"> |
|
|
|
<text style="font-size: 32rpx; font-weight: bold; color: #333; margin-bottom: 20rpx; display: block;">提示</text> |
|
|
|
<text style="font-size: 28rpx; color: #666; line-height: 40rpx;">欢迎使用对比价格功能,此页面用于对比不同商品的价格信息。</text> |
|
|
|
<text style="font-size: 32rpx; font-weight: bold; color: #333; margin-bottom: 20rpx; display: block;">欢迎使用对比价格功能</text> |
|
|
|
<text style="font-size: 28rpx; color: #666; line-height: 40rpx;">此页面用于对比不同商品的价格信息。</text> |
|
|
|
|
|
|
|
<text style="font-size: 28rpx; color: #f10b0bff; line-height: 40rpx;">对比同种商品,不同规格</text> |
|
|
|
<text style="font-size: 28rpx; color: #666; line-height: 40rpx;">的商品价格信息。</text> |
|
|
|
<view style="margin-top: 40rpx;"> |
|
|
|
<button style="background-color: #ff6b81; color: #fff; border-radius: 8rpx; padding: 12rpx 40rpx; font-size: 28rpx;" bindtap="closeTips">我知道了</button> |
|
|
|
</view> |
|
|
|
|