yingsa/miniprogram/pages/match/history/index.wxml
ethanfly 98f9e64d91 refactor: Enhance store and user management features
- Updated user information retrieval to support store-specific points and ladder user data.
- Refactored store initialization logic to prioritize last selected store.
- Improved API endpoints for fetching matches and user data, ensuring compatibility with store context.
- Adjusted UI components to display store-related information consistently across various pages.
- Enhanced error handling and data fetching logic for better user experience.
2026-02-07 11:09:37 +08:00

41 lines
1.5 KiB
Plaintext

<!--比赛记录页面-->
<view class="container">
<view class="history-list" wx:if="{{matches.length > 0}}">
<view class="match-item" wx:for="{{matches}}" wx:key="id">
<view class="match-header">
<view class="match-header-main">
<text class="match-name">{{item.matchName}}</text>
<text class="match-store" wx:if="{{item.storeName}}">{{item.storeName}}</text>
</view>
<text class="match-type">{{item.matchType === 1 ? '挑战赛' : '排位赛'}}</text>
</view>
<view class="match-content">
<view class="content-row">
<view class="result {{item.isWin ? 'win' : 'lose'}}">
{{item.isWin ? '胜' : '负'}}
</view>
<view class="score-info">
<text class="opponent">vs {{item.opponentName}}</text>
<text class="score">{{item.myScore}} : {{item.opponentScore}}</text>
</view>
<view class="power-change {{item.powerChange > 0 ? 'positive' : 'negative'}}">
<text wx:if="{{item.powerChange > 0}}">+</text><text>{{item.powerChange}}</text>
</view>
</view>
</view>
<view class="match-footer">
<text class="match-time">{{item.confirmedAt}}</text>
</view>
</view>
</view>
<view class="empty-state" wx:else>
<image src="/images/empty-match.svg" mode="aspectFit"></image>
<text>暂无比赛记录</text>
</view>
<view wx:if="{{loading}}" class="loading-state">
<text>加载中...</text>
</view>
</view>