refactor: 项目重构,仅保留 login 和 supplementPersonal 页面
删除 11 个旧页面、组件、lefu SDK、旧资源文件。 新增 request 封装(GET/POST/PUT)、api 层、utils/common 身份证工具。 重写 login(登录流程提取到 app.ts) 和 supplementPersonal(简化表单逻辑)。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
439f560218
commit
83d909b95b
@@ -1,106 +0,0 @@
|
||||
<scroll-view
|
||||
class="scrollView"
|
||||
scroll-y
|
||||
refresher-enabled
|
||||
refresher-triggered="{{ refresherTriggered }}"
|
||||
bind:refresherrefresh="onRefresh"
|
||||
bind:scrolltolower="onScrollToLower"
|
||||
>
|
||||
<view class="scrollViewContent">
|
||||
|
||||
<!-- 数据卡(用户信息 + 时间 Tab + 统计) -->
|
||||
<view class="data-card">
|
||||
|
||||
<!-- 用户信息 -->
|
||||
<view class="userInfo">
|
||||
<view class="avatar">{{ userInfo.realname[0] }}</view>
|
||||
<view class="info">
|
||||
<view class="info-name-row">
|
||||
<view class="info-name">{{ userInfo.realname }}</view>
|
||||
<block wx:if="{{ userInfo.isSelf }}">
|
||||
<view class="badge-self">本人</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="info-meta">
|
||||
<view class="meta-text">{{ userInfo.sex_dictText }}</view>
|
||||
<view class="meta-divider">·</view>
|
||||
<view class="meta-text">{{ userInfo.age }}岁</view>
|
||||
<view class="meta-divider">|</view>
|
||||
<view class="meta-text">{{ userInfo.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="{{ activeType === 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.weightChange < 0 ? 'value-down' : 'value-up' }}">
|
||||
{{ stats.weightChange > 0 ? '+' : '' }}{{ stats.weightChange }}<text>kg</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 有数据:记录列表 -->
|
||||
<block wx:if="{{ records.length }}">
|
||||
<view class="data-list">
|
||||
<block wx:for="{{ records }}" wx:key="recordId">
|
||||
<view class="list" bind:tap="onTapRecord" data-record-id="{{ item.recordId }}">
|
||||
<view>{{ item.examTime }}</view>
|
||||
<view class="arrow">
|
||||
<view>体重:<text>{{ item.weight }}kg</text></view>
|
||||
<view>BMI:<text>{{ item.bmi }}</text></view>
|
||||
<view>体脂率:<text>{{ item.fatRate }}%</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 无数据:占位 -->
|
||||
<block wx:else>
|
||||
<view class="empty-state">
|
||||
<view class="empty-icon">
|
||||
<image src="/images/data/noData.png" mode="aspectFit"/>
|
||||
</view>
|
||||
<view class="empty-text">暂无称重数据</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<select-member-drawer
|
||||
show="{{ showSelectDrawer }}"
|
||||
source="history"
|
||||
exclude-user-id="{{ userInfo.userId }}"
|
||||
bind:select="onSelectMember"
|
||||
bind:close="onCloseDrawer"
|
||||
/>
|
||||
Reference in New Issue
Block a user