- 新增选手资料页面,支持查看选手信息及比赛记录 - 添加多个SVG图标替换原有emoji,提升视觉一致性 - 扩展CSS变量系统,增加信息、成功、警告、危险等状态颜色 - 优化多个页面的样式,统一使用CSS变量和现代设计语言 - 修复可选链操作符兼容性问题,改用传统条件判断 - 改进数据加载逻辑,使用Object.assign替代展开运算符 - 调整开发环境配置,使用本地服务器地址
59 lines
2.3 KiB
Plaintext
59 lines
2.3 KiB
Plaintext
<view class="page-container">
|
|
<view class="card profile-card" wx:if="{{player}}">
|
|
<view class="profile-top">
|
|
<image class="avatar" src="{{player.avatar || '/images/avatar-default.svg'}}" mode="aspectFill"></image>
|
|
<view class="profile-main">
|
|
<view class="name-row">
|
|
<text class="name">{{player.realName || player.nickname || '未命名'}}</text>
|
|
<view class="level-pill">Lv{{player.level || 1}}</view>
|
|
</view>
|
|
<view class="meta-row">
|
|
<text class="meta">战力 {{player.powerScore || 0}}</text>
|
|
<text class="meta-divider">·</text>
|
|
<text class="meta">胜率 {{player.winRate || 0}}%</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="profile-stats">
|
|
<view class="stat">
|
|
<text class="stat-value">{{player.matchCount || 0}}</text>
|
|
<text class="stat-label">总场次</text>
|
|
</view>
|
|
<view class="stat">
|
|
<text class="stat-value">{{player.winCount || 0}}</text>
|
|
<text class="stat-label">胜场</text>
|
|
</view>
|
|
<view class="stat">
|
|
<text class="stat-value">{{player.loseCount || 0}}</text>
|
|
<text class="stat-label">负场</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="card section-card">
|
|
<view class="section-header">
|
|
<text class="section-title">近期比赛</text>
|
|
<text class="section-sub" wx:if="{{loadingMatches}}">加载中</text>
|
|
</view>
|
|
|
|
<view class="match-list" wx:if="{{matches.length > 0}}">
|
|
<view class="match-item" wx:for="{{matches}}" wx:key="id">
|
|
<view class="match-row">
|
|
<text class="match-name">{{item.name || item.typeName || '比赛'}}</text>
|
|
<text class="match-time">{{item.timeText || item.createTime || ''}}</text>
|
|
</view>
|
|
<view class="match-row">
|
|
<text class="match-desc">{{item.desc || ''}}</text>
|
|
<text class="match-result {{item.resultClass || ''}}">{{item.resultText || ''}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="empty-state" wx:else>
|
|
<image class="empty-icon" src="/images/empty-records.svg" mode="aspectFit"></image>
|
|
<text class="empty-title">暂无比赛记录</text>
|
|
<text class="empty-desc">完成比赛后会在这里展示</text>
|
|
</view>
|
|
</view>
|
|
</view>
|