文件
jw-beauty/miniprogram/pages/auto-scan/auto-scan.wxss
T
Guoguo 0ffa67da65 feat: implement MVP Phase 1 — full-area scan with ADC data collection
- Send scan command: all 5 regions LED on, brightness 128
- Listen for ADC notify (17 bytes) instead of broken queryStatus
- Parse and display PD1-PD7 values with visual bars
- Show VBAT/battery info
- Store scan PD data in globalData for Phase 3 smart adjustment
- 8s timeout fallback, stop LED on page unload
2026-06-10 08:16:17 -07:00

134 行
2.0 KiB
Plaintext

.scan-container {
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx 0;
}
.face-outline {
width: 320rpx;
height: 400rpx;
border: 6rpx solid #e5e5e5;
border-radius: 50% 50% 45% 45%;
position: relative;
overflow: hidden;
}
.scan-line {
position: absolute;
left: 10rpx;
right: 10rpx;
height: 6rpx;
background: linear-gradient(90deg, transparent, #E6508C, #DCB982, #E6508C, transparent);
animation: scan 2s ease-in-out infinite;
}
@keyframes scan {
0% { top: 0; opacity: 0.5; }
50% { opacity: 1; }
100% { top: calc(100% - 6rpx); opacity: 0.5; }
}
.scan-progress-bar {
width: 80%;
height: 8rpx;
background: #f0f0f0;
border-radius: 4rpx;
margin-top: 30rpx;
overflow: hidden;
}
.scan-progress-fill {
height: 100%;
background: linear-gradient(90deg, #E6508C, #DCB982);
border-radius: 4rpx;
transition: width 0.3s;
}
.scan-status {
font-size: 24rpx;
color: #999;
margin-top: 16rpx;
text-align: center;
}
.scan-result {
background: #fff;
border-radius: 20rpx;
padding: 24rpx;
margin-top: 20rpx;
}
.result-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
margin-bottom: 20rpx;
}
.pd-list {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.pd-item {
display: flex;
align-items: center;
gap: 16rpx;
}
.pd-region {
font-size: 26rpx;
color: #666;
width: 160rpx;
flex-shrink: 0;
}
.pd-value {
font-size: 28rpx;
font-weight: 600;
color: #E6508C;
width: 100rpx;
flex-shrink: 0;
text-align: right;
}
.pd-empty {
color: #ccc;
font-weight: normal;
}
.pd-bar-bg {
flex: 1;
height: 16rpx;
background: #f5f5f5;
border-radius: 8rpx;
overflow: hidden;
}
.pd-bar-fill {
height: 100%;
background: linear-gradient(90deg, #E6508C, #DCB982);
border-radius: 8rpx;
min-width: 4rpx;
}
.vbat-info {
margin-top: 20rpx;
font-size: 24rpx;
color: #999;
text-align: center;
}
.scan-error {
text-align: center;
color: #ff4d4f;
font-size: 26rpx;
margin-top: 20rpx;
}
.btn-primary::after {
border: none;
}