fix(mp): 五专家组审查 HIGH 级问题修复 — 9 项

- S-1: 隐私政策描述修正("混淆加密" → "HTTPS + 微信沙箱")
- A-1: getCachedPatientId 统一导出 + 9 处 Storage 直读替换
- A-2: usePageData loading 改为 useState 响应式
- A-3: health.ts refreshingToday 移入 store state
- M-2: prod config 移除 console.error/warn
- M-4: clearCache 后同步刷新 request.ts 内存缓存
- Q-3: doctor/appointment.ts any[] → Appointment 类型
- Q-4: daily-monitoring 常量提取到 constants.ts
- 清理: 删除空目录 FamilyPicker/HealthCard + 未使用组件 DeviceCard
This commit is contained in:
iven
2026-05-15 09:17:36 +08:00
parent 9bd2d4c2e6
commit dc983945ff
19 changed files with 93 additions and 166 deletions

View File

@@ -1,51 +0,0 @@
@import '../../styles/variables.scss';
.device-card {
display: flex;
align-items: center;
padding: 24rpx;
background: $card;
border-radius: $r;
margin-bottom: 16rpx;
box-shadow: $shadow-sm;
.device-icon {
font-size: var(--tk-font-h2);
margin-right: 20rpx;
}
.device-info {
flex: 1;
.device-name {
font-size: var(--tk-font-cap);
font-weight: 600;
color: $tx;
display: block;
}
.device-status {
font-size: var(--tk-font-micro);
margin-top: 4rpx;
display: block;
&.connected { color: $pri; }
&.idle { color: $tx3; }
}
.last-sync {
font-size: var(--tk-font-micro);
color: $tx3;
margin-top: 4rpx;
display: block;
}
}
.sync-btn {
padding: 12rpx 28rpx;
background: $pri;
color: $white;
border-radius: $r-pill;
font-size: var(--tk-font-micro);
}
}

View File

@@ -1,39 +0,0 @@
import { View, Text } from '@tarojs/components';
import Taro from '@tarojs/taro';
import './index.scss';
interface DeviceCardProps {
deviceName: string;
deviceType: string;
lastSyncAt?: string;
status: 'connected' | 'disconnected' | 'never';
}
const DEVICE_ICONS: Record<string, string> = {
blood_pressure: '\u{1FA7A}',
blood_glucose: '\u{1FA78}',
heart_rate: '\u{2764}',
blood_oxygen: '\u{1FAB1}',
};
export default function DeviceCard({ deviceName, deviceType, lastSyncAt, status }: DeviceCardProps) {
const icon = DEVICE_ICONS[deviceType] || '\u{1F4F1}';
const statusLabel = status === 'connected' ? '已连接' : status === 'disconnected' ? '未连接' : '未配对';
const statusClass = status === 'connected' ? 'connected' : 'idle';
const handleSync = () => {
Taro.navigateTo({ url: '/pages/pkg-health/device-sync/index' });
};
return (
<View className='device-card' onClick={handleSync}>
<View className='device-icon'>{icon}</View>
<View className='device-info'>
<Text className='device-name'>{deviceName}</Text>
<Text className={`device-status ${statusClass}`}>{statusLabel}</Text>
{lastSyncAt && <Text className='last-sync'>: {lastSyncAt}</Text>}
</View>
<View className='sync-btn'></View>
</View>
);
}