backup: snapshot before optimization

This commit is contained in:
2026-06-04 16:25:43 +08:00
commit ff2700c067
47 changed files with 3332 additions and 0 deletions
+91
View File
@@ -0,0 +1,91 @@
<view class="container" style="{{themeStyle}}">
<!-- 统计卡片 -->
<view class="stats card">
<view class="stat-item">
<text class="stat-emoji">📊</text>
<text class="stat-num">{{totalSessions}}次</text>
<text class="stat-label">训练次数</text>
</view>
<view class="stat-item">
<text class="stat-emoji">⏱</text>
<text class="stat-num">{{totalDurationText}}</text>
<text class="stat-label">累计时长</text>
</view>
<view class="stat-item">
<text class="stat-emoji">🏆</text>
<text class="stat-num">{{maxDurationText}}</text>
<text class="stat-label">最长记录</text>
</view>
</view>
<!-- 日历热力图 -->
<view class="calendar-section card">
<view class="month-picker">
<view class="month-arrow" bindtap="onPrevMonth"></view>
<view class="month-title-wrap">
<text class="month-emoji">🗓</text>
<text class="month-title">{{currentYear}}年 {{currentMonth}}月</text>
</view>
<view class="month-arrow" bindtap="onNextMonth"></view>
</view>
<calendar-heatmap
year="{{currentYear}}"
month="{{currentMonth}}"
records="{{monthRecords}}"
binddaytap="onDayTap"
></calendar-heatmap>
</view>
<!-- 历史记录 -->
<view class="history-section card">
<view class="history-header">
<text class="section-title">📋 最近记录</text>
</view>
<view wx:if="{{historyList.length === 0}}" class="empty-state">
<text class="empty-emoji">🏃</text>
<text class="empty-text">还没有训练记录</text>
<text class="empty-sub">开始你的第一次平板支撑吧</text>
</view>
<view class="history-list">
<view class="history-item" wx:for="{{historyList}}" wx:key="id" data-id="{{item.id}}" bindlongpress="onDeleteRecord">
<text class="history-icon">
{{item.duration >= 120 ? '🔥' : item.duration >= 60 ? '💪' : '✅'}}
</text>
<view class="history-left">
<text class="history-date">{{item.date}}</text>
<text class="history-plan">第 {{item.day}} 天</text>
</view>
<view class="history-right">
<text class="history-duration">{{item.duration}}s</text>
</view>
</view>
</view>
</view>
<!-- 日期详情弹窗 -->
<view class="modal-overlay" wx:if="{{showDayDetail}}" bindtap="onCloseDayDetail">
<view class="day-detail-modal" catchtap="noop">
<view class="detail-date-row">
<text class="detail-emoji">📅</text>
<text class="detail-date">{{dayDetail.date}}</text>
</view>
<view class="detail-grid">
<view class="detail-item">
<text class="detail-num">{{dayDetail.sessions}}次</text>
<text class="detail-label">训练次数</text>
</view>
<view class="detail-item">
<text class="detail-num">{{dayDetail.durationText}}</text>
<text class="detail-label">总时长</text>
</view>
<view class="detail-item">
<text class="detail-num">{{dayDetail.calories}}</text>
<text class="detail-label">约消耗 (千卡)</text>
</view>
</view>
<view class="detail-close" bindtap="onCloseDayDetail">
<text>关闭</text>
</view>
</view>
</view>
</view>