feat(miniprogram): 小程序设备数据集成打通 — Phase 3
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- 首页设备入口简化为直接跳转按钮(去除硬编码 never 状态)
- 体征录入页增加「从设备同步」入口,设备数据自动回填表单
- 设备同步页支持 returnTo 参数,完成后返回录入页
- 医护工作台增加告警中心固定导航入口(带数字角标)
This commit is contained in:
iven
2026-04-29 06:36:12 +08:00
parent cac61637ce
commit 202c6dd0d2
7 changed files with 615 additions and 18 deletions

View File

@@ -327,3 +327,63 @@
font-size: 22px;
color: $tx3;
}
/* ─── 设备快捷入口 ─── */
.device-section {
margin: 0 24px 24px;
}
.device-entry {
display: flex;
align-items: center;
background: $card;
border-radius: $r;
padding: 20px 24px;
margin-bottom: 12px;
box-shadow: $shadow-sm;
&:active {
opacity: 0.7;
}
}
.device-entry-icon-wrap {
width: 64px;
height: 64px;
border-radius: $r;
background: $pri-l;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20px;
flex-shrink: 0;
}
.device-entry-icon-text {
font-size: 32px;
}
.device-entry-info {
flex: 1;
min-width: 0;
}
.device-entry-name {
font-size: 28px;
font-weight: 600;
color: $tx;
display: block;
margin-bottom: 4px;
}
.device-entry-desc {
font-size: 22px;
color: $tx3;
display: block;
}
.device-entry-arrow {
font-size: 32px;
color: $tx3;
flex-shrink: 0;
}

View File

@@ -3,7 +3,6 @@ import { useState } from 'react';
import Taro, { useDidShow } from '@tarojs/taro';
import { useAuthStore } from '../../stores/auth';
import { useHealthStore } from '../../stores/health';
import DeviceCard from '../../components/DeviceCard';
import Loading from '../../components/Loading';
import { trackPageView } from '@/services/analytics';
import * as appointmentApi from '@/services/appointment';
@@ -123,18 +122,28 @@ export default function Index() {
<Text className='greeting-date'>{new Date().toLocaleDateString('zh-CN', { month: 'long', day: 'numeric', weekday: 'short' })}</Text>
</View>
{/* 设备快捷入口 */}
{/* 设备快捷入口 — 点击直接跳转设备同步页面 */}
<View className='device-section'>
<DeviceCard
deviceName='血压计'
deviceType='blood_pressure'
status='never'
/>
<DeviceCard
deviceName='血糖仪'
deviceType='blood_glucose'
status='never'
/>
<View className='device-entry' onClick={() => Taro.navigateTo({ url: '/pages/device-sync/index' })}>
<View className='device-entry-icon-wrap'>
<Text className='device-entry-icon-text'>{'\u{1FA7A}'}</Text>
</View>
<View className='device-entry-info'>
<Text className='device-entry-name'></Text>
<Text className='device-entry-desc'> · </Text>
</View>
<Text className='device-entry-arrow'>{''}</Text>
</View>
<View className='device-entry' onClick={() => Taro.navigateTo({ url: '/pages/device-sync/index' })}>
<View className='device-entry-icon-wrap'>
<Text className='device-entry-icon-text'>{'\u{1FA78}'}</Text>
</View>
<View className='device-entry-info'>
<Text className='device-entry-name'></Text>
<Text className='device-entry-desc'> · </Text>
</View>
<Text className='device-entry-arrow'>{''}</Text>
</View>
</View>
{/* 今日健康 */}