EP-WachatApp/eaterplanet_ecommerce/components/new-comer/index.wxml

39 lines
2.2 KiB
Plaintext

<!-- 新人专享 -->
<view class='new-comers' wx:if="{{list.length}}">
<!-- diy头 -->
<block wx:if="{{diyData}}">
<view class="diylist-theme-bg diylist-theme-{{diyData.bgSelect}}"></view>
<view class="diylist-head i-flex" wx:if="{{diyData.style==1}}">
<image class="diylist-s1-lefticon" src="{{diyData.host + diyData.list[0].imageUrl}}"></image>
<view class="diylist-s1-name">{{diyData.list[0].title}}</view>
<view></view>
</view>
</block>
<block wx:else>
<view class='new-comers-title'><text class="leftBorder" style="border-color: {{skin.color}}"></text>新人专享</view>
</block>
<scroll-view class='new-comers-scroll' scroll-x bindscrolltolower="getMore">
<view class='new-comers-wrap {{list.length<=3?"onlyThree":""}}'>
<i-router-link routerClass="new-comers-item" url="/eaterplanet_ecommerce/pages/goods/goodsDetail?id={{item.actId}}" wx:for="{{list}}" wx:key="id">
<i-img defaultImage="../../images/placeholder-refund.png" height="220" width="220" iClass="new-img" loadImage="{{item.skuImage}}" isLazy="{{true}}"></i-img>
<view wx:if="{{item.label_info && item.label_info.type==0}}" class='item-tag'>
<image class='item-tag-bg' mode='widthFix' src="../../images/tag.png"></image>
<view class='tag-name {{item.label_info.len==2?"two-word":""}}'>{{item.label_info.tagcontent}}</view>
</view>
<view wx:if="{{item.label_info && item.label_info.type==1}}" class='item-tag' style='background:url({{item.label_info.tagcontent}}) no-repeat left top;background-size: 100%;'></view>
<view class="act-end" wx:if="{{item.spuCanBuyNum==0}}">已抢光</view>
<view class='title'>{{item.spuName}}</view>
<view class='new-bot'>
<view class='price'>¥{{item.actPrice[0]}}.{{item.actPrice[1]}}</view>
<i-button iClass="add-cart" wx:if="{{disabled||item.spuCanBuyNum==0}}">
<image class='img' src="../../images/icon-add-shopCart-disabled.png"></image>
</i-button>
<i-button bind:click="openSku" data-idx="{{index}}" iClass="add-cart" wx:else>
<i-addcart iClass='img' />
</i-button>
</view>
</i-router-link>
</view>
</scroll-view>
</view>