index.wxml 7.76 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-title-mask'></view>
        <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'>
                    <text>{{item.sort}}</text>
                    <view wx:if="{{item.helpName}}" class='item-user-assist'>
                        <image src='{{item.helpheadIco}}'></image>
                        <text>助力</text>
                    </view>
                </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 || item.vipLevel === 0}}'>
                        <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 || !activityInfo.isDrawEnd)}}">
        <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='navigateToMyList'>
            <view class='userrank' hidden='{{hidePopup}}'>
                <view class='rank-text'>
                    <!-- {{userInfo.sort}} -->
                    <text wx:if="{{!userInfo.isLucky}}">再接再厉</text>
                    <text wx:else>查看我的排队号</text>
                </view>
            </view>
            <view class='userhead'>
                <image src='{{resultHead[userInfo.isLucky]}}'></image>
            </view>
        </view>
    </block>
    <!--如果活动正在进行中-->
    <block wx:elif='{{activityInfo.isBegin === 1 && !activityInfo.isEnd}}'>
        <form bindsubmit='submitFormId' report-submit='true'>
            <view class='button-container'>
                <button class='join-button' bindtap='joinInQueue' form-type='submit'>
                    <text>参加活动</text>
                </button>
            </view>
        </form>
    </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-wrapper' hidden='{{!showMsg ? true: false}}'>
      <view class='msg-container'>
          <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>
                  <form bindsubmit='submitFormId' report-submit='true'> 
                      <view class='msg-button-container'>
                          <button class='button-close' bindtap='closeMsg' plain='true' form-type='submit'>关闭</button>
                          <button class='button-share' open-type="share" plain='true' form-type='submit' bindtap='reportShare'>去分享</button>
                      </view>
                  </form> 
              </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>
    <form bindsubmit='submitFormId' report-submit='true'>
        <button wx:if="{{activityInfo.isBegin === 1 && userInfo.isDrawline && !activityInfo.isEnd}}" class='invite-button' hidden='{{hideInviteButton}}' form-type='submit'  bindtap='inviteFriends'>
            邀请好友助力排队
        </button>
    </form>
</view>
<template is="zan-actionsheet" data="{{...actionSheet}}" />