60 lines
2.4 KiB
Plaintext
60 lines
2.4 KiB
Plaintext
<!-- subpackage/parent/fitness-detail/fitness-detail.wxml -->
|
|
<view class="page-wrap">
|
|
<mp-bar background="linear-gradient(190deg, #49a5fc 0%, #f5f8ff 700rpx, #f5f8ff 100%)" title="{{name}}详情" color="#fff" back="{{true}}"></mp-bar>
|
|
|
|
<!-- 成绩变化趋势 -->
|
|
<view class="section-card">
|
|
<view class="section-title-wrap">
|
|
<view class="section-title">成绩变化趋势</view>
|
|
</view>
|
|
<view class="unit-label">单位:{{unit}}</view>
|
|
<view class="chart-wrap" style="width:{{lineCWidth}}px;height:{{lineCHeight}}px;">
|
|
<canvas
|
|
type="2d"
|
|
id="lineCanvas"
|
|
canvas-id="lineCanvas"
|
|
style="width:{{lineCWidth}}px;height:{{lineCHeight}}px;"
|
|
bind:tap="tapLine"
|
|
bindtouchstart="touchstartLine"
|
|
bindtouchmove="touchmoveLine"
|
|
bindtouchend="touchendLine"
|
|
/>
|
|
</view>
|
|
<view wx:if="{{!item || !item.scoreTrendChart || item.scoreTrendChart.axisX.length === 0}}" class="empty-tip">暂无趋势数据</view>
|
|
</view>
|
|
|
|
<!-- 成绩对比 -->
|
|
<view class="section-card">
|
|
<view class="section-title-wrap">
|
|
<view class="section-title">成绩对比</view>
|
|
</view>
|
|
|
|
<view class="compare-rows">
|
|
<view class="compare-row">
|
|
<view class="compare-label">我的<text class="nl">成绩</text></view>
|
|
<view class="bar-track">
|
|
<view class="bar-fill" style="width:{{item ? (item.lastScore / item.maxScore * 100) + '%' : '0%'}}"></view>
|
|
</view>
|
|
<text class="bar-val">{{item ? item.lastScore : 0}}</text>
|
|
</view>
|
|
<!-- <view class="compare-row">
|
|
<view class="compare-label">班级<text class="nl">平均成绩</text></view>
|
|
<view class="bar-track">
|
|
<view class="bar-fill bar-fill-light" style="width:{{item ? (item.classAvgScore / item.maxScore * 100) + '%' : '0%'}}"></view>
|
|
</view>
|
|
<text class="bar-val">{{item ? item.classAvgScore : 0}}</text>
|
|
</view> -->
|
|
<view class="compare-row">
|
|
<view class="compare-label">机构<text class="nl">平均成绩</text></view>
|
|
<view class="bar-track">
|
|
<view class="bar-fill bar-fill-lighter" style="width:{{item ? (item.schoolAvgScore / item.maxScore * 100) + '%' : '0%'}}"></view>
|
|
</view>
|
|
<text class="bar-val">{{item ? item.schoolAvgScore : 0}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="bar-unit-label">单位:{{unit}}</view>
|
|
</view>
|
|
|
|
</view>
|