66 lines
3.1 KiB
Plaintext
66 lines
3.1 KiB
Plaintext
<view class="points-page">
|
|
<!-- 导航栏 -->
|
|
<!-- 蓝色头部 -->
|
|
<view class="header">
|
|
<mp-navigation-bar title="我的积分" background-color="transparent" color="#fff" bind:click-left="onBack" left-arrow></mp-navigation-bar>
|
|
<image class="stat-icon" src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/event_miniapp/point.png" mode="aspectFit" />
|
|
<view class="points-total">
|
|
<text class="points-num">{{totalPoints}}</text>
|
|
<text class="points-label">我的积分</text>
|
|
</view>
|
|
</view>
|
|
<!-- Tab 切换 -->
|
|
<view class="tab-bar">
|
|
<view class="tab-item {{activeTab === 1 ? 'active' : ''}}" bindtap="onSwitchTab" data-tab="1">
|
|
<text class="tab-text">获取记录</text>
|
|
<image class="stat-iconb" wx:if="{{activeTab === 1}}" src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/event_miniapp/point-b.png" mode="aspectFit" />
|
|
</view>
|
|
<view class="tab-item {{activeTab === 2 ? 'active' : ''}}" bindtap="onSwitchTab" data-tab="2">
|
|
<text class="tab-text">消耗记录</text>
|
|
<image class="stat-iconb" wx:if="{{activeTab === 2}}" src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/event_miniapp/point-b.png" mode="aspectFit" />
|
|
</view>
|
|
</view>
|
|
<!-- 列表 -->
|
|
<view class="record-list">
|
|
<!-- 空状态 -->
|
|
<view wx:if="{{records.length === 0 && !loading}}" class="empty">
|
|
<!-- <view class="empty-icon">
|
|
<view class="empty-doc">
|
|
<view class="empty-doc-top"></view>
|
|
<view class="empty-doc-line"></view>
|
|
<view class="empty-doc-line short"></view>
|
|
<view class="empty-doc-line"></view>
|
|
</view>
|
|
<view class="empty-doc-shadow"></view>
|
|
</view> -->
|
|
<image class="empty-icon" src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/event_miniapp/nothing.png" mode="aspectFit" />
|
|
<text class="empty-text">暂无{{activeTab === 1 ? '获取' : '消耗'}}记录</text>
|
|
</view>
|
|
<!-- 有数据时:表头 + 列表 -->
|
|
<block wx:if="{{records.length > 0}}">
|
|
<view class="table-header">
|
|
<text class="th th-event">赛事</text>
|
|
<text class="th th-project">项目-组别</text>
|
|
<text class="th th-rank">名次</text>
|
|
<text class="th th-points">积分</text>
|
|
</view>
|
|
<view wx:for="{{records}}" wx:key="id" class="record-row">
|
|
<view class="td td-event">
|
|
<text class="event-name">{{item.title || '-'}}</text>
|
|
<text class="event-time">{{item.createdTimeStr}}</text>
|
|
</view>
|
|
<text class="td td-project">{{item.projectInfo || '-'}}</text>
|
|
<text class="td td-rank">{{item.rank || '-'}}</text>
|
|
<div class="td td-points {{activeTab == 1 ? 'positive' : 'negative'}}">
|
|
{{activeTab == 1 ? '+' : '-'}}{{item.points}}
|
|
</div>
|
|
</view>
|
|
</block>
|
|
<view wx:if="{{loading}}" class="loading-tip">
|
|
<text>加载中...</text>
|
|
</view>
|
|
<view wx:if="{{noMore && records.length > 0}}" class="loading-tip">
|
|
<text>没有更多了</text>
|
|
</view>
|
|
</view>
|
|
</view> |