锦水居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

87 lines
4.0 KiB

<view class="home">
<view class='title'>
<text class="number">{{points}}</text>
<text class="name">积分</text>
<view class="rule">
<view class="exchange-box">
<image src='../../images/exchange.png' class="exchange" bind:tap="goExchangeIndex" />
</view>
<text bindtap="bindtapIntegralRule">积分规则</text>
<image src="../../images/note.png" class="note" bindtap="bindtapIntegralRule" />
</view>
</view>
<!-- tabbar -->
<view class="tab-bar">
<view class="tab tab1 {{selectTab === 'tab1' ? 'select-tab' : ''}}" data-tab="tab1" bindtap="onTabChange">
积分排行
</view>
<view class="tab tab2 {{selectTab === 'tab2' ? 'select-tab' : ''}}" data-tab="tab2" bindtap="onTabChange">
积分记录
</view>
<view class="select-bar {{selectTab === 'tab1' ? 'tab1' : 'tab2'}}"></view>
</view>
<!-- 积分排行 -->
<block wx:if="{{selectTab === 'tab1'}}">
<view class="Top"></view>
<view class="tab-item">
<button wx:for="{{typeList}}" wx:key="index" wx:for-index="index" bindtap="onButtonChange" hover-class="hover-btn" data-type="{{item.type}}" id="item-{{ item.type }}" class="{{item.select ? 'font-w' : 'font-b'}}">
{{item.name}}
</button>
</view>
<view class="ph-list" wx:if="{{pointsRankingUser}}">
<view class="left">
<!-- 左边图片 -->
<view class="left-img">
<view class="list-number_frist">{{pointsRankingUser.rank}}</view>
</view>
<!-- 名字 -->
<view class="list-name">{{pointsRankingUser.realName||pointsRankingUser.nickName}}</view>
</view>
<view class="right">{{pointsRankingUser.points||pointsRankingUser.grade}}</view>
</view>
<view class="warning">注:该排行仅显示已完善信息用户</view>
<!-- <view class="marginTop"></view> -->
<view class="ph-list" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{pointsRankinglist}}">
<view class="left">
<!-- 左边图片 -->
<view class="left-img">
<!-- <image class="img-bg" wx:if="{{index == 0}}" src="../../images/first.png"></image>
<image class="img-bg" wx:elif="{{index == 1}}" src="../../images/second.png"></image>
<image class="img-bg" wx:elif="{{index == 2}}" src="../../images/third.png"></image> -->
<!-- <image class="img-bg" wx:else src="../../images/fourth.png"></image> -->
<!-- <view wx:if="{{index < 3}}" class="list-number">{{item.rank}}</view> -->
<view class="{{index < 3 ? 'list-number_frist' : 'list-number_'}} {{index===0 ? 'color1_' : index===1 ? 'color2_' : index===2 ? 'color2_' : ''}}">
{{item.rank}}
</view>
</view>
<!-- 名字 -->
<view class="list-name">{{item.realName||item.nickName}}</view>
</view>
<view class="right">{{item.points||item.grade}}</view>
</view>
<no-data isShow="{{nodatapointsRanking}}"></no-data>
</block>
<!-- 积分记录 -->
<block wx:else>
<view class="Top"></view>
<view class="jf-title">
<view class="jf-title-item">事件名称</view>
<view class="jf-title-item-two">积分</view>
<view class="jf-title-item-last">时间</view>
</view>
<!-- 积分记录列表 -->
<view class="jf-list" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{pointsRecordlist}}">
<view class="jf-list-li color1">{{item.ruleDesc}}</view>
<view class="jf-list-li-two color2">
<text wx:if="{{item.operationType == 0}}">-</text>
<text wx:else>+</text>
{{item.points}}
</view>
<view class="jf-list-li jf-list-li-last color1">{{item.operationTime}}</view>
</view>
<no-data isShow="{{nodatapointsRecord}}"></no-data>
</block>
<!-- 加载更多提示 -->
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<completeInfo-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></completeInfo-dialog>
</view>