|
|
|
@ -51,21 +51,99 @@ |
|
|
|
<view |
|
|
|
wx:for="{{categories}}" |
|
|
|
wx:key="item" |
|
|
|
class="category-card" |
|
|
|
class="category-card {{item === '粉壳' ? 'pink-shell-card' : item === '绿壳' ? 'green-shell-card' : item === '褐壳' ? 'brown-shell-card' : 'free-range-card'}}" |
|
|
|
data-category="{{item}}" |
|
|
|
bindtap="selectCategory" |
|
|
|
> |
|
|
|
<!-- 标签系统 --> |
|
|
|
<view class="card-labels"> |
|
|
|
<view class="feature-label"> |
|
|
|
<text class="feature-label-text">{{item === '绿壳' ? '珍稀品种' : item === '粉壳' ? '杂交品种' : item === '褐壳' ? '常见品种' : '农家散养'}}</text> |
|
|
|
</view> |
|
|
|
<view class="category-label"> |
|
|
|
<text class="category-label-text">{{item}}系列</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 产品图片区域 --> |
|
|
|
<view class="product-image-container"> |
|
|
|
<image |
|
|
|
src="../../images/OIP-C.png" |
|
|
|
mode="aspectFill" |
|
|
|
class="product-image" |
|
|
|
/> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 文字信息区域 --> |
|
|
|
<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" |
|
|
|
/> |
|
|
|
<text class="product-title">{{item}}鸡蛋</text> |
|
|
|
<text class="product-description">{{categoryDescriptions[item] || '点击选择此类型查看相关商品'}}</text> |
|
|
|
|
|
|
|
<!-- 卖点标签 --> |
|
|
|
<view class="selling-points"> |
|
|
|
<!-- 粉壳鸡蛋卖点 --> |
|
|
|
<view wx:if="{{item === '粉壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🧬</text> |
|
|
|
<text class="selling-point-text">杂交品种</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '粉壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🌸</text> |
|
|
|
<text class="selling-point-text">粉红蛋壳</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '粉壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">👅</text> |
|
|
|
<text class="selling-point-text">口感细腻</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 绿壳鸡蛋卖点 --> |
|
|
|
<view wx:if="{{item === '绿壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🍃</text> |
|
|
|
<text class="selling-point-text">五黑一绿</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '绿壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">💪</text> |
|
|
|
<text class="selling-point-text">高氨基酸</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '绿壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🏥</text> |
|
|
|
<text class="selling-point-text">保健功效</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 褐壳鸡蛋卖点 --> |
|
|
|
<view wx:if="{{item === '褐壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🔥</text> |
|
|
|
<text class="selling-point-text">常见品种</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '褐壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">📦</text> |
|
|
|
<text class="selling-point-text">耐运输</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '褐壳'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🍳</text> |
|
|
|
<text class="selling-point-text">日常烹饪</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 土鸡蛋卖点 --> |
|
|
|
<view wx:if="{{item === '土鸡蛋'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🌾</text> |
|
|
|
<text class="selling-point-text">自然觅食</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '土鸡蛋'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🥚</text> |
|
|
|
<text class="selling-point-text">蛋黄饱满</text> |
|
|
|
</view> |
|
|
|
<view wx:if="{{item === '土鸡蛋'}}" class="selling-point"> |
|
|
|
<text class="selling-point-icon">🥘</text> |
|
|
|
<text class="selling-point-text">风味浓郁</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 按钮区域 --> |
|
|
|
<view class="card-footer"> |
|
|
|
<button class="select-button" bindtap="selectCategory" data-category="{{item}}"> |
|
|
|
<text class="select-button-icon">→</text> |
|
|
|
<text class="select-button-text">选择</text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|