index.wxml 2.76 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' wx:for-index="index" data-id='{{listItem.id}}' data-code='{{listItem.limitProductCode}}' data-is-app='{{listItem.isApp}}' bindtap='navigateToDetail'>
                        <image src="{{helper.image(listItem.defaultUrl, 690, 460, 1)}}"></image>
                        <image wx:if="{{tabSelected == 1 && index < 5}}" src="../../static/images/no{{index+1}}@3x.png" class="rank" />
                        <image wx:if="{{tabSelected == 0 && listItem.hotFlag}}" src="../../static/images/hot@3x.png" class="rank" />
                        <image wx:if="{{listItem.isApp == 'Y'}}" src="../../static/images/app_only@3x.png" class="app_only" />
                        <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 {{isFullSucreen? "fix-full-my-code-button": ""}}' bindtap='navigateToHome'>
        我的限购码
    </view>
</view>