index.wxml
6.77 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<!--pages/limit/queue.wxml 限定商品用户排队页面-->
<import src="../../vendors/zanui/actionsheet/index.wxml" />
<view class='container'>
<!--头部-->
<!-- <scroll-view scroll-y scroll-top='{{scrollTop}}' bindscroll='scroll' bindscrolltolower='onReachBottom' scroll-with-animation> -->
<view class='queue-title' style='background-image: url("{{activityInfo.topBanner}}")'>
<view class='queue-buttons'>
<text class='queue-desc-link' bindtap='navigateToDescPage'>点击查看活动说明>></text>
<button class='queue-prize-link {{activityInfo.isDrawEnd ? "active" : ""}}' bindtap='navigateToPrizeUserList'>{{activityInfo.isDrawEnd ? '查看中奖名单' : '等待开奖中'}}</button>
</view>
</view>
<!--排队列表-->
<block class='queue-list' wx:for='{{queueList}}' wx:key='{{item.id}}'>
<view id='item_{{item.uid}}' class='queue-item {{item.uid === userInfo.uid ? "active" : ""}}'>
<view class='item-head-container'>
<!--headImage-->
<image class='item-head' src='{{item.headIco}}'></image>
<block wx:if='{{item.isLucky}}'>
<view class='gift-icon'>
<image src='{{giftImage}}'></image>
</view>
</block>
</view>
<view class='item-info-container'>
<!--itemInfo-->
<view class='item-user-rank'>{{item.sort}}</view>
<view class='item-user-name'>{{item.nickName}}</view>
<view class='item-user-time'>
<view class='item-user-time-icon'></view>
<view class='item-user-time-text'>{{item.queueTime}}</view>
<view class='item-user-vip-level' wx:if='{{item.vipLevel}}'>
<image src='{{item.vipImage}}'></image>
</view>
</view>
</view>
<view class='item-bg'>
<image src='{{item.background}}'></image>
</view>
</view>
</block>
<!-- </scroll-view> -->
<!--悬浮按钮-->
<block wx:if="{{userInfo.isDrawline && !activityInfo.isEnd}}">
<view class='user-container' bindtap='navigateToMyList'>
<view class='userrank' hidden='{{hidePopup}}'>
<view class='rank-text'>
<!-- {{userInfo.sort}} -->
查看我的排队号
</view>
</view>
<view class='userhead'>
<image src='{{userInfo.headIco}}'></image>
</view>
</view>
</block>
<!--如果用户已排队,并且活动结束, 展示用户中奖或未中奖的头像-->
<block wx:elif='{{userInfo.isDrawline && activityInfo.isEnd}}'>
<view class='user-container {{userInfo.isLucky ? "success" : "fail"}}' bindtap='navigateToUserCodePage'>
<view class='userrank' hidden='{{hidePopup}}'>
<view class='rank-text'>
<!-- {{userInfo.sort}} -->
查看我的排队号
</view>
</view>
<view class='userhead'>
<image src='{{resultHead[userInfo.isLucky]}}'></image>
</view>
</view>
</block>
<!--如果活动正在进行中-->
<block wx:elif='{{activityInfo.isBegin === 1 && !activityInfo.isEnd}}'>
<view class='button-container' bindtap='joinInQueue'>
<view class='join-button'>
<text>参加活动</text>
</view>
</view>
</block>
<!--活动即将开始-->
<block wx:elif='{{!activityInfo.isBegin}}'>
<view class='button-container'>
<view class='end-button'>
<text>即将开售</text>
</view>
</view>
</block>
<!--活动结束-->
<block wx:elif='{{activityInfo.isEnd}}'>
<view class='button-container' bindtap='joinInQueue'>
<view class='end-button'>
<text>活动结束</text>
</view>
</view>
</block>
<!--弹出消息框-->
<view class='msg-container' hidden='{{!showMsg ? true : false}}'>
<block wx:if='{{userInfo.sort}}'><!--用户有排队信息的情况下-->
<block wx:if='{{activityInfo.isDrawEnd}}'><!--如果活动结束,并开奖-->
<block wx:if='{{userInfo.isLucky}}'><!--中奖弹框-->
<text class='title'>恭喜!</text>
<text class='queue-text lucky'>
<text>恭喜您限购码GET,请到个人中心查看明细。</text>
</text>
<view class='msg-button-container'>
<view class='button-close' bindtap='closeMsg'>关闭</view>
<button class='button-share' plain='true' bindtap='navigateToUserCodePage'>去看看</button>
</view>
</block>
<block wx:else><!--没中奖弹框-->
<text class='title'>OOPS!</text>
<text class='queue-text lucky'>
<text>幸运女神擦肩而过,不要灰心下次就是您!</text>
</text>
<view class='msg-button-container fail'>
<view class='button-close' bindtap='closeMsg'>关闭</view>
</view>
</block>
</block>
<block wx:else><!--活动没结束,排队成功弹框-->
<text class='title'>排队成功</text>
<text class='queue-text'>
<text>您的排队号为: </text>
<text class='queue-num'>{{userInfo.sort}}</text>
</text>
<text class='share-text'>分享给小伙伴,中奖几率更高哦~</text>
<view class='msg-button-container'>
<view class='button-close' bindtap='closeMsg'>关闭</view>
<button class='button-share' open-type="share" plain='true'>去分享</button>
</view>
</block>
</block>
<block wx:else><!--活动结束弹框-->
<text class='title'>OOPS!</text>
<text class='queue-text fail'>
<text>您来晚啦,下次早点哦</text>
</text>
<view class='msg-button-container fail'>
<view class='button-close' bindtap='closeMsg'>关闭</view>
</view>
</block>
</view>
<form bindsubmit='submitFormId' report-submit='true'>
<button class='invite-button' hidden='{{hideInviteButton}}' form-type='submit' bindtap='inviteFriends'>
邀请好友助力排队
</button>
</form>
</view>
<template is="zan-actionsheet" data="{{...actionSheet}}" />