index.wxml
6.5 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<wxs src="../../wxs/helper.wxs" module="helper" />
<view class="home-coupon-index">
<!-- 我的限购码 -->
<view wx:if="{{isBound}}" class='container {{!limitCodes.invalidCodes.length && !limitCodes.codes.length ? "no-code" : ""}}' style='{{!limitCodes.invalidCodes.length && !limitCodes.codes.length ? "height:" + containerHeight : ""}}'>
<!--限购码介绍-->
<view class='desc-container'>
<block wx:for='{{h5PageUrl}}' wx:key='item.title'>
<view class='link-menu' bindtap='navigateToh5Page' data-type='{{index}}'>
<text>{{item.title}}</text>
<view class='link-arrow'>
<image src='../../static/images/limit/arrow.png'></image>
</view>
</view>
</block>
<view class='gray-space'></view>
<!--灰色的间隔-->
</view>
<view wx:if='{{isShow}}' class='limit-code-container'>
<block wx:if='{{!limitCodes.invalidCodes.length && !limitCodes.codes.length}}'>
<view class='icon'>
<image src='../../static/images/limit/lock_b.png'></image>
</view>
<view class='text'>
<text>暂无限购码</text>
</view>
<button class='button' bindtap='navigateToLimitListPage'>随便看看</button>
</block>
<block wx:else>
<block wx:for='{{limitCodes.codes}}' wx:key='item.limitCode'>
<view class='limit-code-item'>
<view class='item-container' data-code="{{item.limitProductCode}}" bindtap='navigateToDetail'>
<view class='item-head'>
<image src='../../static/images/limit/lock_s.png'></image>
<text class='code-text'>限购码:{{item.limitCode}}</text>
</view>
<view class='item-content'>
<image src='{{item.defaultUrl}}'></image>
<view class='item-content-info'>
<view class='info-title'>
<text>{{item.productName}}</text>
</view>
<view class='info-uc'>
<text></text>
</view>
<view class='info-price'>
<text>{{item.price}}</text>
</view>
</view>
</view>
</view>
</view>
<view class='gray-space'></view>
<!--灰色的间隔-->
</block>
<block wx:if='{{limitCodes.invalidCodes.length}}'>
<view class='codes-spliter'>
<text>已失效</text>
</view>
<view class='gray-space'></view>
</block>
<block wx:for='{{limitCodes.invalidCodes}}' wx:key='item.limitCode'>
<view class='limit-code-item'>
<view class='item-container' data-code="{{item.limitProductCode}}" bindtap='navigateToDetail'>
<view class='item-head'>
<image src='../../static/images/limit/lock_s.png'></image>
<text class='code-text'>限购码:{{item.limitCode}}</text>
<view class='item-invalid-icon'>
<text>失效</text>
</view>
</view>
<view class='item-content'>
<image src='{{item.defaultUrl}}'></image>
<view class='item-content-info'>
<view class='info-title'>
<text>{{item.productName}}</text>
</view>
<view class='info-uc'>
<text></text>
</view>
<view class='info-price'>
<text>{{item.price}}</text>
</view>
</view>
</view>
</view>
</view>
<view class='gray-space'></view>
<!--灰色的间隔-->
</block>
</block>
</view>
</view>
<view wx:if='{{showLogin}}' class="user-info-bar" hidden='{{isBound}}'> <!--不需要显示用户信息了-->
<view class='login-container' wx:if="{{!isBound}}">
<image class="logo" src="../../static/images/home-logo.png"></image>
<view class='login-buttons'>
<view class='to-login'>{{loginText}}</view>
<login-button class="login-area auto-btn" openType="{{loginButtonType}}"></login-button>
</view>
<view class='login-tips'>{{loginTips}}</view>
</view>
<view wx:if="{{isBound}}">
<image wx:if="{{userInfo.avatarUrl == ''}}" class="avatar" src="../../static/images/icons/avatar@2x.png"></image>
<image wx:if="{{userInfo.avatarUrl != '' && userInfo.defaultAvatar}}" class="avatar"
src="{{userInfo.avatarUrl}}"></image>
<image wx:if="{{userInfo.avatarUrl != '' && !userInfo.defaultAvatar}}" class="avatar"
src="{{helper.image(userInfo.avatarUrl, 108, 108)}}"></image>
<text class="phone">{{userInfo.nickName || userInfo.phoneNum}}</text>
<text class="coin">积分:<text class="num">{{coinNum}}</text></text>
</view>
</view>
<!--不用显示退出登录了-->
<view class="out-login" bindtap="outLogin" wx:if="{{userInfo.uid}}" hidden='true'>退出登录</view>
</view>