80 lines
2.5 KiB
Plaintext
80 lines
2.5 KiB
Plaintext
<scroll-view class="scrollView" scroll-y>
|
||
<view class="scrollViewContent">
|
||
|
||
<!-- 数据卡(成员信息 + 时间 Tab + 统计) -->
|
||
<view class="data-card">
|
||
|
||
<!-- 成员信息 -->
|
||
<view class="userInfo">
|
||
<view class="avatar" style="background: {{ currentMember.avatar }};"></view>
|
||
<view class="info">
|
||
<view class="info-name-row">
|
||
<view class="info-name">{{ currentMember.name }}</view>
|
||
<block wx:if="{{ currentMember.isSelf }}">
|
||
<view class="badge-self">本人</view>
|
||
</block>
|
||
</view>
|
||
<view class="info-meta">
|
||
<view class="meta-text">{{ currentMember.gender }}</view>
|
||
<view class="meta-divider">·</view>
|
||
<view class="meta-text">{{ currentMember.age }}岁</view>
|
||
<view class="meta-divider">|</view>
|
||
<view class="meta-text">{{ currentMember.height }}cm</view>
|
||
</view>
|
||
</view>
|
||
<view class="btn" bind:tap="onTapSwitchMember">切换成员</view>
|
||
</view>
|
||
|
||
<view class="card-divider"></view>
|
||
|
||
<!-- 时间范围 Tab -->
|
||
<view class="nav">
|
||
<block wx:for="{{ rangeTabs }}" wx:key="key">
|
||
<view
|
||
class="{{ activeRange === item.key ? 'active' : '' }}"
|
||
data-key="{{ item.key }}"
|
||
bind:tap="onTapRange"
|
||
>{{ item.label }}</view>
|
||
</block>
|
||
</view>
|
||
|
||
<!-- 统计摘要(4格) -->
|
||
<view class="summary">
|
||
<view class="summary-item">
|
||
<view class="summary-label">最高体重</view>
|
||
<view class="summary-value">{{ stats.maxWeight }}<text>kg</text></view>
|
||
</view>
|
||
<view class="summary-item">
|
||
<view class="summary-label">最低体重</view>
|
||
<view class="summary-value">{{ stats.minWeight }}<text>kg</text></view>
|
||
</view>
|
||
<view class="summary-item">
|
||
<view class="summary-label">平均体重</view>
|
||
<view class="summary-value">{{ stats.avgWeight }}<text>kg</text></view>
|
||
</view>
|
||
<view class="summary-item">
|
||
<view class="summary-label">体重变化</view>
|
||
<view class="summary-value {{ stats.weightDiff < 0 ? 'value-down' : 'value-up' }}">
|
||
{{ stats.weightDiff > 0 ? '+' : '' }}{{ stats.weightDiff }}<text>kg</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 历史记录列表 -->
|
||
<view class="data-list">
|
||
<block wx:for="{{ recordList }}" wx:key="id">
|
||
<view class="list">
|
||
<view>{{ item.time }}</view>
|
||
<view>
|
||
<view>体重:<text>{{ item.weight }}kg</text></view>
|
||
<view>BMI:<text>{{ item.bmi }}</text></view>
|
||
<view>体脂率:<text>{{ item.bodyFat }}%</text></view>
|
||
</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
|
||
</view>
|
||
</scroll-view>
|