82 lines
2.8 KiB
Plaintext
82 lines
2.8 KiB
Plaintext
<view class="points-page">
|
|
<!-- 蓝色头部 -->
|
|
<view class="header">
|
|
<view class="header-bg"></view>
|
|
<view class="status-bar"></view>
|
|
<view class="nav-bar">
|
|
<view class="nav-back" bindtap="onBack">
|
|
<text class="back-arrow">←</text>
|
|
</view>
|
|
<text class="nav-title">我的积分</text>
|
|
<view class="nav-placeholder"></view>
|
|
</view>
|
|
<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>
|
|
<view class="tab-line" wx:if="{{activeTab === 1}}"></view>
|
|
</view>
|
|
<view class="tab-item {{activeTab === 2 ? 'active' : ''}}" bindtap="onSwitchTab" data-tab="2">
|
|
<text class="tab-text">消耗记录</text>
|
|
<view class="tab-line" wx:if="{{activeTab === 2}}"></view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 列表 -->
|
|
<scroll-view
|
|
class="record-list"
|
|
scroll-y
|
|
enhanced
|
|
show-scrollbar="{{false}}"
|
|
bindscrolltolower="onLoadMore"
|
|
>
|
|
<!-- 空状态 -->
|
|
<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>
|
|
<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>
|
|
<text class="td td-points {{item.points > 0 ? 'positive' : 'negative'}}">{{item.points > 0 ? '+' : ''}}{{item.points}}</text>
|
|
</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>
|
|
</scroll-view>
|
|
</view>
|
|
|