rank.wxml 5.2 KB
<wxs module="filter" src="../../utils/utilswxs.wxs"></wxs>
<view class="page">
  <view class="app__bgc bgc"></view>
  <image class="bg" mode="widthFix" src="../../image/rank/rank-c1.png" />
  <view class="app__content main">
    <view class="top-space"></view>
    <view class="content">
      <!-- 导航 -->
      <view class="nav">
        <view bindtap="onNavSelectHandler" data-index="0" class="nav-item {{navIndex == 0 ? 'nav-item-act':''}}">
          <view class="tit">推广奖金排行</view>
          <view class="line"></view>
        </view>
        <view bindtap="onNavSelectHandler" data-index="1" class="nav-item {{navIndex == 1 ? 'nav-item-act':''}}">
          <view class="tit">总奖金排行</view>
          <view class="line"></view>
        </view>
      </view>
      <!-- 排行 -->
      <view class="border rank">
        <!-- <block wx:if="{{rankInfo && rankInfo.memberList.length > 0}}"> -->
        <!-- 功能区 -->
        <view class="rank-func">
          <view class="rank-func-item">
            <!-- 本轮 -->
            <view wx:if="{{turnsIndex == 0}}" class="pubish">
              <view class="t1">
                本轮周期:
                <span>{{rankInfo.activityName || '-' }}</span>
              </view>
              <view wx:if="{{status == 'promotion'}}" class="t1 t2">
                本轮奖品:
                <span class="c1">{{rankInfo.prizeName || '-'}}</span>
              </view>
              <view wx:if="{{status == 'rank'}}" class="t1 t2">
                我的名次:
                <span class="c2">{{rankInfo.myMember.rank || '-'}}</span>

              </view>
            </view>
            <!-- 历史 -->
            <view wx:else class="pubish">
              <picker value="{{historyIndex}}" range="{{historyRankInfoList}}" range-key="activityName" bindchange="bindHistoryChange">
                <view class="func">
                  <image class="icon" mode="aspectFit" src="../../image/icon/icon-sign-record.png" />
                  {{rankInfo.activityName || '-'}}
                  <image class="arrow" mode="aspectFit" src="../../image/icon/icon-filter-down-on.png" />
                  {{dateStart}}
                </view>
              </picker>
            </view>
          </view>
          <view class="rank-func-item rank-func-item2 pubish fje">
            <view wx:if="{{turnsIndex == 0}}" data-index="1" bindtap="onChangeTurnsHandler" class="mode">
              查看历史排行
            </view>
            <view wx:if="{{turnsIndex == 1}}" data-index="0" bindtap="onChangeTurnsHandler" class="mode">
              返回本轮排行
            </view>
          </view>
        </view>
        <block wx:if="{{rankInfo}}">
          <!-- 标题 -->
          <view class="tit">
            <view class="tt t1">名次</view>
            <view class="tt t2">名称</view>
            <view class="tt t3">奖金</view>
          </view>
          <!-- 排行item -->
          <scroll-view bindscrolltolower="onRankScrolltolower" scroll-y="{{true}}" class="item-wrap">
            <view wx:for="{{rankInfo.memberList}}" wx:key="{{index}}" class="rank-item {{item.rank == '1' ? 'rank-item-first':''}}">
              <view class="no">
                <image wx:if="{{item.rank == '1'}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
                <span wx:else>{{item.rank}}</span>
              </view>
              <view class="user">
                <image class="avatar" mode="widthFix" src="{{item.avatar}}" />
                {{item.nickname}}
              </view>
              <view class="integral">{{filter.Fen2Yuan(item.points)}}</view>
            </view>
          </scroll-view>
          <!-- 省略号 -->
          <view class="etc">...</view>
          <!-- 我的排名 -->
          <view class="my-rank" wx:if="{{rankInfo.myMember}}">
            <view class="rank-item">
              <view class="no">
                <image wx:if="{{rankInfo.myMember.rank == 1}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
                <span wx:else>{{rankInfo.myMember.rank || '-'}}</span>
              </view>
              <view class="user">
                <image class="avatar" mode="widthFix" src="{{rankInfo.myMember.avatar}}" />
                {{rankInfo.myMember.nickname}}
              </view>
              <view class="integral">{{filter.Fen2Yuan(rankInfo.myMember.points)}}</view>
            </view>
          </view>
        </block>
        <block wx:else>
          <view class="empty-tips" wx:if="{{isInit}}">
            <view class="tips">暂未开启奖金排行,敬请期待</view>
          </view>
        </block>
      </view>
      <!-- 排行提示 -->
      <view class="rank-tpis">本排行榜仅面向五金分销商及电工</view>
      <!-- 我的奖励按钮 -->
      <view wx:if="{{status == 'promotion'}}" class="btn-wrap">
        <view bindtap="onRankGiftHandler" class="btn">
          <image class="integral" mode="aspectFit" src="../../image/icon/icon-rank-rewrad.png" />
          我的奖励
        </view>
      </view>
    </view>
  </view>
</view>
<van-popup show="{{ authorizeVisible }}">
  <authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>