index.wxml 2.59 KB
<wxs src="../../wxs/helper.wxs" module="helper" />

<view class="container">
    <!--顶部tab切换-->
    <view class='tab-bar-container'>
        <view wx:for="{{tabBarArr}}" wx:key="name" class='tab-bar-item' bindtap='tabChange' data-index="{{index}}">
            <block wx:if="{{tabSelected === index}}"><!--选中的tabBarIndex和循环里的index相同时-->
                <!-- <image src="{{item.iconSelected}}"></image> -->
                <text class='selected'>{{item.name}}</text>
            </block>
            <block wx:else>
                <!-- <image src="{{item.icon}}"></image> -->
                <text>{{item.name}}</text>
            </block>
        </view>
    </view>
    <!--列表内容-->
    <view class='list-wrapper'>
        <view class='list-top-blank'>{{refreshText}}</view> 
        <view class='list-container'>
            <block wx:for='{{listData}}' wx:key='index' wx:for-item='nowList'>
                <block wx:if='{{index === tabSelected}}'>
                   <view class='item-container' wx:for='{{nowList.limitProductVoList}}' wx:key="listItem.id" wx:for-item='listItem' data-id='{{listItem.id}}' data-code='{{listItem.limitProductCode}}'  bindtap='navigateToDetail'>
                        <image src="{{helper.image(listItem.defaultUrl, 690, 460, 1)}}"></image>
                        <image wx:if="{{true}}" src="../../static/images/no1@3x.png" class="rank" />
                        <image wx:if="{{true}}" src="../../static/images/app_only@3x.png" class="app_only" />
                        <image wx:if="{{true}}" src="../../static/images/sold_out@3x.png" class="sold_out" />
                        <view class='item-content'>
                            <text class='item-name'>{{listItem.productName}}</text>
                            <view class='item-info'>
                                <text class='item-price'>{{listItem.price || '¥0.00'}}</text>
                                <view class='item-date'>
                                     <!-- <image src='{{icon.clock}}'></image>  -->
                                    <text>{{listItem.saleTime}}发售</text>
                                </view>
                            </view>
                        </view>
                    </view>
                </block>
            </block>
        </view>
        <view class='list-foot-blank'>{{footText}}</view>
    </view>
    <view class="rule-bg" bindtap="goToRule">
      <text class="rule-text">参与规则</text>
    </view>

    <!--我的限购码按钮-->
    <view class='my-code-button' bindtap='navigateToHome'>
        我的限购码
    </view>
</view>