index.wxml
2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<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>
<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='my-code-button' bindtap='navigateToHome'>
我的限购码
</view>
</view>