Files
hms/apps/miniprogram/native/pkg-veepoo/index.wxss
iven a86219c8a0 fix(mp): Veepoo M2 BLE 审计 C1-C5/H1-H6 全量修复
CRITICAL 修复:
- C1: 体温测量传 { switch: boolean } 参数 + 停止指令
- C2: uploadReadings 使用正确 NormalizedReading 类型替代 as any
- C3: navigatedRef 防重入避免 React 18 Strict Mode 双触发导航
- C4: WXML gauge 空闲态用 data 预计算值替代 findIndex+匿名函数
- C5: _onReady 清除 _authTimeout 防止 Timer 泄漏

HIGH 修复:
- H1: WXML 用 results[type] 替代未声明的 measureStates
- H2: handleConnect 添加 _connecting 防重入保护
- H4: 连接回调兼容 errno:0 / errCode:0 fallback
- H5: _formatValues 零值合法显示(!== undefined && !== null)

MEDIUM:
- Storage key 添加 hms: 命名空间前缀防冲突
2026-05-30 13:11:49 +08:00

356 lines
5.2 KiB
Plaintext

/* Veepoo M2 原生页面样式 */
page {
background: #F5F5F4;
min-height: 100vh;
}
/* ═══ 连接屏幕 ═══ */
.connect-screen {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 40rpx;
}
.connect-anim {
position: relative;
width: 200rpx;
height: 200rpx;
margin-bottom: 48rpx;
}
.connect-ring {
position: absolute;
top: 0; left: 0;
width: 100%; height: 100%;
border-radius: 50%;
border: 4rpx solid #D6D3D1;
}
.connect-ring--active {
border-color: #C4623A;
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { transform: scale(1); opacity: 0.6; }
50% { transform: scale(1.1); opacity: 1; }
}
.connect-center {
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%, -50%);
width: 80rpx; height: 80rpx;
border-radius: 50%;
background: #292524;
display: flex;
align-items: center;
justify-content: center;
}
.connect-bt {
color: #FAFAF9;
font-size: 28rpx;
font-weight: 600;
}
.connect-title {
font-size: 36rpx;
font-weight: 600;
color: #1C1917;
margin-bottom: 16rpx;
}
.connect-hint {
font-size: 26rpx;
color: #78716C;
margin-bottom: 48rpx;
}
.connect-error {
background: #FEF2F2;
border-radius: 16rpx;
padding: 24rpx 32rpx;
margin-bottom: 32rpx;
width: 100%;
max-width: 600rpx;
}
.connect-error-text {
font-size: 26rpx;
color: #DC2626;
}
.connect-btn-wrap {
width: 100%;
max-width: 600rpx;
}
.connect-back {
width: 100%;
max-width: 600rpx;
margin-top: 24rpx;
}
/* ═══ 按钮 ═══ */
.btn-primary {
background: #C4623A;
color: #FFFFFF;
font-size: 30rpx;
font-weight: 600;
text-align: center;
padding: 24rpx 0;
border-radius: 16rpx;
}
.btn-secondary {
background: #FFFFFF;
color: #44403C;
font-size: 30rpx;
font-weight: 500;
text-align: center;
padding: 24rpx 0;
border-radius: 16rpx;
border: 2rpx solid #D6D3D1;
}
.btn-large {
width: 100%;
max-width: 600rpx;
}
.actions-row {
display: flex;
gap: 24rpx;
width: 100%;
max-width: 600rpx;
}
.actions-row .btn-secondary,
.actions-row .btn-primary {
flex: 1;
}
/* ═══ 测量页面 ═══ */
.measure-page {
padding: 24rpx;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* ── Header ── */
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16rpx 24rpx;
background: #FFFFFF;
border-radius: 16rpx;
margin-bottom: 24rpx;
}
.header-device {
display: flex;
align-items: center;
gap: 12rpx;
}
.header-dot {
width: 16rpx; height: 16rpx;
border-radius: 50%;
background: #A8A29E;
}
.header-dot--on {
background: #22C55E;
}
.header-name {
font-size: 28rpx;
font-weight: 600;
color: #1C1917;
}
.header-battery {
font-size: 24rpx;
color: #78716C;
}
.header-disconnect {
font-size: 26rpx;
color: #C4623A;
}
/* ── Selector ── */
.selector {
display: flex;
justify-content: space-around;
padding: 24rpx 0;
background: #FFFFFF;
border-radius: 16rpx;
margin-bottom: 24rpx;
}
.selector-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 8rpx;
padding: 12rpx 16rpx;
border-radius: 12rpx;
position: relative;
}
.selector-item--active {
background: #FFF7ED;
}
.selector-item--done::after {
content: '';
}
.selector-icon {
font-size: 40rpx;
}
.selector-label {
font-size: 22rpx;
color: #57534E;
}
.selector-check {
position: absolute;
top: 4rpx; right: 4rpx;
width: 28rpx; height: 28rpx;
border-radius: 50%;
color: #FFFFFF;
font-size: 18rpx;
display: flex;
align-items: center;
justify-content: center;
}
/* ── Gauge ── */
.gauge {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 48rpx 0;
}
.gauge-circle {
width: 400rpx;
height: 400rpx;
border-radius: 50%;
background: #FFFFFF;
border: 8rpx solid #E7E5E4;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 24rpx;
}
.gauge-icon {
font-size: 64rpx;
margin-bottom: 16rpx;
}
.gauge-hint {
font-size: 26rpx;
color: #78716C;
}
.gauge-value {
font-size: 80rpx;
font-weight: 700;
line-height: 1.1;
}
.gauge-loading {
font-size: 30rpx;
color: #78716C;
}
.gauge-err {
font-size: 72rpx;
font-weight: 700;
color: #DC2626;
margin-bottom: 8rpx;
}
.gauge-err-text {
font-size: 26rpx;
color: #DC2626;
}
.gauge-progress-bar {
width: 500rpx;
height: 8rpx;
background: #E7E5E4;
border-radius: 4rpx;
overflow: hidden;
}
.gauge-progress-fill {
height: 100%;
background: #C4623A;
border-radius: 4rpx;
transition: width 0.3s ease;
}
/* ── Assessment ── */
.assessment {
text-align: center;
padding: 16rpx;
}
.assessment-text {
font-size: 26rpx;
color: #16A34A;
}
/* ── Disclaimer ── */
.disclaimer {
text-align: center;
padding: 16rpx 32rpx;
}
.disclaimer-text {
font-size: 22rpx;
color: #A8A29E;
}
/* ── Actions ── */
.actions {
padding: 24rpx 0;
}
/* ── Measure Error ── */
.measure-error {
text-align: center;
padding: 16rpx;
}
.measure-error-text {
font-size: 26rpx;
color: #DC2626;
}