- 新增 VeepooBridge API:精准睡眠读取(readPreciseSleepData)、B3自动测量配置 (readAutoTestConfig/setAutoTestConfig)、开关设置(setAutoHeartRate/BP/Temp)、 体温自动数据读取(readAutoTemperatureData),共 10 个新 API - 新增 SDK 事件类型:SDK_EVENT_SLEEP(4)、SDK_EVENT_AUTO_TEST(54) - VeepooPipeline 新增:readSleepData/readAllSleepData(enableAutoMeasurement 睡眠数据 Promise 化读取 + 自动测量一键开启 - VeepooHistoryReader 新增:uploadSleepReadings 睡眠数据上传 - stores/veepoo.ts 实装:注册 onSleepData 回调、syncHistory 实际读取+上传、 readSleepData 状态管理、enableAutoMeasurement、连接后自动触发三件事 - 原生页面(native/pkg-veepoo):_onReady 后自动读取 3 天睡眠 + 开启自动测量, 新增 _readSleepData/_handleSleepEvent/_enableAutoMeasurement - UI 重构:测量页药丸式选择器+SVG 圆环仪表盘+健康评估标签 - 数据上传页:2 列结果卡片网格+彩色条标识+睡眠数据卡片(★评分+总时长) - 修复上传按钮无响应 bug:patientId 增加 URL fallback + 错误提示不再静默 - 设计原型:docs/design/veepoo-measure-prototype.html(4 状态预览)
257 lines
4.5 KiB
SCSS
257 lines
4.5 KiB
SCSS
// Veepoo 测量结果 + 上传页样式
|
|
// 设计原型: docs/design/veepoo-measure-prototype.html
|
|
@import '../../../styles/variables.scss';
|
|
|
|
.vm-page {
|
|
min-height: 100vh;
|
|
background: var(--tk-bg-primary, $bg);
|
|
}
|
|
|
|
// ── 连接中(等待跳转态) ──
|
|
.vm-connect {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
padding: 0 32px;
|
|
|
|
&__anim {
|
|
position: relative;
|
|
width: 120px;
|
|
height: 120px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
&__ring {
|
|
position: absolute;
|
|
inset: 0;
|
|
border-radius: 50%;
|
|
border: 3px solid $pri;
|
|
animation: vm-pulse-ring 2s ease-out infinite;
|
|
}
|
|
|
|
&__center {
|
|
position: absolute;
|
|
inset: 20px;
|
|
border-radius: 50%;
|
|
background: $pri;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
&__bt {
|
|
color: #fff;
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
&__title {
|
|
font-family: Georgia, 'Times New Roman', serif;
|
|
font-size: var(--tk-font-h2, 22px);
|
|
font-weight: 700;
|
|
color: $tx;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
&__hint {
|
|
font-size: var(--tk-font-body-sm, 14px);
|
|
color: $tx3;
|
|
}
|
|
}
|
|
|
|
@keyframes vm-pulse-ring {
|
|
0% { transform: scale(1); opacity: 1; }
|
|
100% { transform: scale(1.4); opacity: 0; }
|
|
}
|
|
|
|
// ── 上传页面 ──
|
|
.vm-upload {
|
|
min-height: 100vh;
|
|
padding-bottom: 40px;
|
|
|
|
&__header {
|
|
padding: var(--tk-gap-lg, 24px) var(--tk-page-padding, 20px) var(--tk-gap-md, 16px);
|
|
}
|
|
|
|
&__title {
|
|
display: block;
|
|
font-family: Georgia, 'Times New Roman', serif;
|
|
font-size: var(--tk-font-h2, 22px);
|
|
font-weight: 700;
|
|
color: $tx;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
&__subtitle {
|
|
display: block;
|
|
font-size: var(--tk-font-body-sm, 14px);
|
|
color: $tx3;
|
|
margin-top: 4px;
|
|
}
|
|
}
|
|
|
|
// ── 结果卡片网格 ──
|
|
.vm-results-grid {
|
|
padding: 0 var(--tk-page-padding, 20px);
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: var(--tk-gap-sm, 12px);
|
|
}
|
|
|
|
.vm-result-card {
|
|
background: $card;
|
|
border-radius: var(--tk-card-radius, 16px);
|
|
padding: var(--tk-gap-md, 16px);
|
|
box-shadow: $shadow-sm;
|
|
position: relative;
|
|
overflow: hidden;
|
|
|
|
&--full {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
&--empty {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
&__badge {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 4px;
|
|
height: 100%;
|
|
border-radius: 0 4px 4px 0;
|
|
}
|
|
|
|
&__label {
|
|
display: block;
|
|
font-size: var(--tk-font-cap, 13px);
|
|
color: $tx2;
|
|
margin-bottom: 8px;
|
|
padding-left: 8px;
|
|
}
|
|
|
|
&__row {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 4px;
|
|
padding-left: 8px;
|
|
}
|
|
|
|
&__value {
|
|
font-family: Georgia, 'Times New Roman', serif;
|
|
font-size: var(--tk-font-num-lg, 34px);
|
|
font-weight: 700;
|
|
color: $tx;
|
|
line-height: 1;
|
|
}
|
|
|
|
&__unit {
|
|
font-size: var(--tk-font-cap, 13px);
|
|
color: $tx3;
|
|
}
|
|
|
|
&__tag {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
margin-top: 8px;
|
|
margin-left: 8px;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
font-size: var(--tk-font-micro, 11px);
|
|
font-weight: 500;
|
|
|
|
&--normal {
|
|
background: $acc-l;
|
|
color: $acc;
|
|
}
|
|
|
|
&--warning {
|
|
background: $wrn-l;
|
|
color: $wrn;
|
|
}
|
|
|
|
&--danger {
|
|
background: $dan-l;
|
|
color: $dan;
|
|
}
|
|
}
|
|
|
|
&__placeholder {
|
|
padding-left: 8px;
|
|
font-size: var(--tk-font-body-sm, 14px);
|
|
color: $tx3;
|
|
}
|
|
|
|
&--sleep {
|
|
padding-bottom: 12px;
|
|
}
|
|
}
|
|
|
|
// ── 睡眠数据行 ──
|
|
.vm-sleep-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 6px 8px;
|
|
margin-left: 8px;
|
|
|
|
&__day {
|
|
font-size: var(--tk-font-body-sm, 14px);
|
|
color: $tx2;
|
|
min-width: 40px;
|
|
}
|
|
|
|
&__time {
|
|
font-family: Georgia, 'Times New Roman', serif;
|
|
font-size: var(--tk-font-body, 16px);
|
|
font-weight: 600;
|
|
color: $tx;
|
|
}
|
|
|
|
&__quality {
|
|
font-size: 12px;
|
|
color: $wrn;
|
|
margin-left: auto;
|
|
}
|
|
}
|
|
|
|
// ── 底部上传播区 ──
|
|
.vm-upload-footer {
|
|
padding: var(--tk-gap-lg, 24px) var(--tk-page-padding, 20px) var(--tk-gap-xl, 32px);
|
|
|
|
&__hint {
|
|
display: block;
|
|
font-size: var(--tk-font-cap, 13px);
|
|
color: $tx3;
|
|
text-align: center;
|
|
margin-bottom: var(--tk-gap-sm, 12px);
|
|
}
|
|
|
|
&__btn {
|
|
width: 100%;
|
|
}
|
|
|
|
&__time {
|
|
display: block;
|
|
font-size: var(--tk-font-micro, 11px);
|
|
color: $tx3;
|
|
text-align: center;
|
|
margin-top: var(--tk-gap-sm, 12px);
|
|
}
|
|
}
|
|
|
|
// ── 长者模式 ──
|
|
.elder-mode {
|
|
.vm-results-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.vm-result-card__value {
|
|
font-size: var(--tk-font-num-lg, 40px);
|
|
}
|
|
}
|