ltx 647bc39d27 feat: 完成体质报告小程序入口与教练资源播放优化
教练端在学生报告页录入体质数据并生成报告,新增报告查看页;学员端从报告页查看最新评估结果、体测指标与运动建议。请求统一走现有 QA 后端并携带登录令牌。

教学资源改用后台音频管理器,支持进度拖动、曲目切换、时长探测及网络异常时下载恢复;修正跳绳和开合跳动作提示文案。

验证:相关 JS 语法、页面 JSON 解析和 git diff --cached --check 均通过。
2026-10-23 16:48:58 +08:00

94 lines
5.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--subpackage/teacher/student-fitness-detail/student-fitness-detail.wxml-->
<view class="page-wrap" style="padding: 0 30rpx; padding-bottom: 300rpx; box-sizing: border-box;">
<mp-bar background="linear-gradient(190deg, #49a5fc 0%, #f5f8ff 700rpx, #f5f8ff 100%)" title="学生报告" color="#fff" back="{{true}}"></mp-bar>
<view class="posture-actions">
<view class="posture-action posture-action-primary" bindtap="goPostureEntry">录入体质信息并生成体测报告</view>
<view class="posture-action posture-action-secondary" bindtap="goPostureReport">查看体测报告</view>
</view>
<!-- 体测报告 -->
<view class="fitness-card">
<view class="fitness-chart-title">体测成绩对比</view>
<view class="radar-wrap" style="width:{{radarCWidth}}px;height:{{radarCHeight}}px;">
<canvas type="2d" id="radarCanvas" canvas-id="radarCanvas" style="width:{{radarCWidth}}px;height:{{radarCHeight}}px;" />
</view>
</view>
<view class="fitness-grid">
<view class="fitness-item" wx:for="{{fitnessItems}}" wx:key="categoryValue" data-item="{{item}}" bind:tap="showFitnessScore">
<image src="{{item.imgUrl}}" class="fitness-icon" mode="aspectFit" />
<view class="fitness-name">{{item.name}}</view>
<view class="fitness-score">{{item.lastScore}}<text class="fitness-unit"> {{item.unit}}</text></view>
</view>
</view>
<view wx:if="{{fitnessItems.length === 0}}" class="empty-tip">暂无体测数据</view>
<!-- 成绩弹窗遮罩 -->
<view class="popup-mask" wx:if="{{showFitnessPopup}}" bind:tap="closeFitnessPopup"></view>
<!-- 成绩弹窗 -->
<view class="score-popup {{showFitnessPopup ? 'popup-show' : ''}}">
<view class="popup-header">
<image src="{{selectedFitnessItem.imgUrl}}" class="popup-icon" mode="aspectFit" />
<text class="popup-title">{{selectedFitnessItem.name}}</text>
<view class="popup-close" bind:tap="closeFitnessPopup">✕</view>
</view>
<view class="score-rows">
<view class="score-row">
<view class="score-label">本次成绩</view>
<view class="score-value score-highlight">{{selectedFitnessItem.lastScore}}<text class="score-unit"> {{selectedFitnessItem.unit}}</text></view>
</view>
<view class="score-row">
<view class="score-label">上次成绩</view>
<view class="score-value">{{selectedFitnessItem.prevScore}}<text class="score-unit"> {{selectedFitnessItem.unit}}</text></view>
</view>
</view>
<view class="popup-btn" bind:tap="goFitnessDetail">查看详细趋势</view>
</view>
<!-- 月份选择弹窗 -->
<view class="picker-mask" wx:if="{{showMonthPicker}}" bind:tap="closeMonthPicker"></view>
<view class="picker-sheet {{showMonthPicker ? 'picker-sheet-show' : ''}}">
<view class="picker-header">
<text class="picker-cancel" bind:tap="closeMonthPicker">取消</text>
<text class="picker-title">选择月份</text>
<text class="picker-confirm" style="visibility:hidden">确定</text>
</view>
<view class="picker-year-row">
<view class="picker-year-arrow" bind:tap="prevPickerYear">‹</view>
<text class="picker-year-text">{{pickerYear}}年</text>
<view class="picker-year-arrow {{pickerYear >= nowYear ? 'picker-year-arrow-disabled' : ''}}" bind:tap="nextPickerYear">›</view>
</view>
<view class="picker-month-grid">
<view class="picker-month-item {{(item === selectedMonth && pickerYear === selectedYear) ? 'picker-item-active' : ''}} {{(pickerYear === nowYear && item > nowMonth) ? 'picker-item-disabled' : ''}}"
wx:for="{{monthList}}" wx:key="*this" data-month="{{item}}" bind:tap="selectMonth">
{{item}}月
</view>
</view>
</view>
<!-- 季度选择弹窗 -->
<view class="picker-mask" wx:if="{{showQuarterPicker}}" bind:tap="closeQuarterPicker"></view>
<view class="picker-sheet {{showQuarterPicker ? 'picker-sheet-show' : ''}}">
<view class="picker-header">
<text class="picker-cancel" bind:tap="closeQuarterPicker">取消</text>
<text class="picker-title">选择季度</text>
<text class="picker-confirm" style="visibility:hidden">确定</text>
</view>
<view class="picker-year-row">
<view class="picker-year-arrow" bind:tap="prevPickerYear">‹</view>
<text class="picker-year-text">{{pickerYear}}年</text>
<view class="picker-year-arrow {{pickerYear >= nowYear ? 'picker-year-arrow-disabled' : ''}}" bind:tap="nextPickerYear">›</view>
</view>
<view class="picker-quarter-list">
<view class="picker-quarter-item {{(item.value === selectedQuarter && pickerYear === selectedYear) ? 'picker-item-active' : ''}} {{(pickerYear === nowYear && item.value > nowQuarter) ? 'picker-item-disabled' : ''}}"
wx:for="{{quarterList}}" wx:key="value" data-quarter="{{item.value}}" bind:tap="selectQuarter">
<text class="picker-quarter-label">{{item.label}}</text>
<text class="picker-quarter-months">{{item.months}}</text>
</view>
</view>
</view>
</view>