This commit is contained in:
Your Name
2026-06-03 14:20:51 +08:00
parent ec4e0b9f29
commit df65344d8f
6 changed files with 619 additions and 16 deletions
@@ -244,11 +244,110 @@
}
.weekly-page .st-chart-head {
display: flex;
flex-direction: column;
align-items: stretch;
margin-bottom: 12rpx;
gap: 12rpx;
padding: 0 20rpx;
}
.weekly-page .st-chart-head-text {
width: 100%;
}
/* 图例 + AI 胶囊同一行,避免大块图标压过标题 */
.weekly-page .st-chart-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12rpx;
gap: 16rpx;
width: 100%;
}
.weekly-page .st-chart-ai-chip {
flex-shrink: 0;
min-height: 88rpx;
display: flex;
align-items: center;
}
.weekly-page .st-chart-ai-chip-inner {
display: flex;
align-items: center;
gap: 10rpx;
min-height: 64rpx;
padding: 10rpx 22rpx 10rpx 12rpx;
border-radius: 999rpx;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(236, 253, 245, 0.92) 100%);
border: 1rpx solid rgba(0, 108, 73, 0.14);
box-shadow:
0 2rpx 6rpx rgba(15, 23, 42, 0.04),
inset 0 1rpx 0 rgba(255, 255, 255, 0.9);
transition:
background 0.22s ease,
border-color 0.22s ease,
box-shadow 0.22s ease,
transform 0.15s ease;
}
.weekly-page .st-chart-ai-chip-icon {
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background: rgba(0, 108, 73, 0.08);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.weekly-page .st-chart-ai-chip-label {
font-size: 26rpx;
font-weight: 700;
color: #0f3d2e;
letter-spacing: 0.02em;
white-space: nowrap;
}
.weekly-page .st-chart-ai-chip.hint .st-chart-ai-chip-inner {
border-color: rgba(0, 108, 73, 0.28);
box-shadow:
0 2rpx 8rpx rgba(0, 108, 73, 0.1),
0 0 0 2rpx rgba(78, 222, 163, 0.22);
}
.weekly-page .st-chart-ai-chip.active .st-chart-ai-chip-inner {
background: linear-gradient(135deg, #1a8f5c 0%, #006c49 100%);
border-color: rgba(0, 108, 73, 0.35);
box-shadow: 0 6rpx 18rpx rgba(0, 108, 73, 0.2);
}
.weekly-page .st-chart-ai-chip.active .st-chart-ai-chip-icon {
background: rgba(255, 255, 255, 0.18);
}
.weekly-page .st-chart-ai-chip.active .st-chart-ai-chip-label {
color: #ffffff;
}
.weekly-page .st-chart-ai-chip.loading .st-chart-ai-chip-inner {
opacity: 0.82;
}
.weekly-page .st-chart-ai-chip:active .st-chart-ai-chip-inner {
transform: scale(0.98);
opacity: 0.92;
}
@media (prefers-reduced-motion: reduce) {
.weekly-page .st-chart-ai-chip-inner {
transition: background 0.01s, border-color 0.01s, opacity 0.01s;
}
.weekly-page .st-chart-ai-chip:active .st-chart-ai-chip-inner {
transform: none;
}
}
.weekly-page .st-chart-title {
@@ -285,7 +384,107 @@
.weekly-page .st-chart-legend {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--st-inline-gap);
flex: 1;
min-width: 0;
}
/* 趋势卡内展开的 AI 建议 */
.weekly-page .st-chart-care-panel {
margin: 12rpx 20rpx 0;
padding: 28rpx 24rpx 24rpx;
border-radius: 28rpx;
background: rgba(255, 255, 255, 0.72);
border: 1rpx solid rgba(221, 228, 221, 0.65);
box-shadow: inset 0 1rpx 0 rgba(255, 255, 255, 0.95);
}
.weekly-page .st-chart-care-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
margin-bottom: 8rpx;
}
.weekly-page .st-chart-care-title {
font-size: 30rpx;
font-weight: 700;
color: var(--on-surface);
}
.weekly-page .st-chart-care-actions {
display: flex;
align-items: center;
gap: 12rpx;
flex-shrink: 0;
}
.weekly-page .st-chart-care-refresh {
display: flex;
align-items: center;
gap: 6rpx;
padding: 10rpx 18rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.7);
font-size: 22rpx;
font-weight: 600;
color: var(--primary);
}
.weekly-page .st-chart-care-refresh.disabled {
opacity: 0.5;
}
.weekly-page .st-chart-care-close {
min-height: 64rpx;
padding: 10rpx 18rpx;
display: flex;
align-items: center;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.55);
font-size: 22rpx;
font-weight: 600;
color: var(--on-surface-variant);
}
.weekly-page .st-chart-care-close:active {
opacity: 0.75;
}
.weekly-page .st-chart-care-sub {
display: block;
margin-bottom: 16rpx;
font-size: 24rpx;
line-height: 1.4;
color: var(--on-surface-variant);
}
.weekly-page .st-care-badge--in-chart {
margin-bottom: 16rpx;
}
.weekly-page .st-skeleton--in-chart {
padding: 8rpx 0;
}
.weekly-page .st-care-cards--in-chart {
gap: 16rpx;
}
.weekly-page .st-care-cards--in-chart .st-meal-glass {
padding: 24rpx;
}
.weekly-page .st-care-stats--in-chart {
margin-top: 16rpx;
}
.weekly-page .st-care-disclaimer--in-chart {
margin-top: 16rpx;
font-size: 22rpx;
}
.weekly-page .st-legend-item {
@@ -693,6 +892,114 @@
text-align: center;
}
.weekly-page .st-skeleton-line.short {
width: 55%;
}
/* ===== AI 血糖照护(嵌在趋势卡内) ===== */
.weekly-page .st-care-badge {
position: relative;
z-index: 1;
display: inline-flex;
margin-bottom: 24rpx;
padding: 8rpx 20rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.65);
font-size: 24rpx;
font-weight: 600;
color: var(--primary);
}
.weekly-page .st-care-cards {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 20rpx;
}
.weekly-page .st-care-block--tcm {
background: rgba(254, 243, 199, 0.55);
border-color: rgba(217, 119, 6, 0.12);
}
.weekly-page .st-care-block--next {
background: rgba(224, 242, 254, 0.55);
border-color: rgba(14, 165, 233, 0.12);
}
.weekly-page .st-care-watch {
padding: 24rpx 32rpx;
border-radius: var(--st-radius-2xl);
background: rgba(255, 255, 255, 0.75);
border: 1rpx solid rgba(255, 255, 255, 0.9);
}
.weekly-page .st-care-watch-title {
display: block;
margin-bottom: 12rpx;
font-size: 28rpx;
font-weight: 700;
color: var(--on-surface);
}
.weekly-page .st-care-watch-item {
display: flex;
align-items: flex-start;
gap: 8rpx;
margin-bottom: 8rpx;
}
.weekly-page .st-care-watch-dot {
font-size: 32rpx;
line-height: 1.2;
color: var(--primary);
}
.weekly-page .st-care-watch-text {
flex: 1;
font-size: 28rpx;
line-height: 1.43;
color: var(--on-surface-variant);
}
.weekly-page .st-care-stats {
position: relative;
z-index: 1;
display: flex;
flex-wrap: wrap;
gap: 12rpx;
margin-top: 20rpx;
}
.weekly-page .st-care-stat-chip {
padding: 12rpx 20rpx;
border-radius: 16rpx;
background: rgba(255, 255, 255, 0.55);
}
.weekly-page .st-care-stat-label {
display: block;
font-size: 22rpx;
color: var(--outline);
}
.weekly-page .st-care-stat-val {
font-size: 24rpx;
font-weight: 600;
color: var(--on-surface-variant);
}
.weekly-page .st-care-disclaimer {
position: relative;
z-index: 1;
display: block;
margin-top: 20rpx;
font-size: 24rpx;
line-height: 1.4;
color: var(--outline);
}
/* ===== 底部浮动输入 ===== */
.weekly-page .st-float-ask {
position: fixed;