index.wxml 6.67 KB
<!--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>
    <view class='invite-button' hidden='{{hideInviteButton}}'  bindtap='inviteFriends'>
        邀请好友助力排队
    </view>
</view>
<template is="zan-actionsheet" data="{{...actionSheet}}" />