更新
This commit is contained in:
@@ -373,24 +373,38 @@
|
||||
<!-- AI 饮食助手(霍大夫升糖指数 · 结合近7/30天血糖) -->
|
||||
<view v-if="diagnosisId" class="card ai-diet-card">
|
||||
<view class="ai-diet-hero">
|
||||
<view class="ai-diet-hero-main">
|
||||
<view class="ai-diet-hero-icon" aria-hidden="true">
|
||||
<TongjiIcon name="sparkles" size="md" color="#ffffff" />
|
||||
</view>
|
||||
<view class="ai-diet-hero-copy">
|
||||
<text class="ai-diet-title">AI 饮食建议</text>
|
||||
<text class="ai-diet-sub">读您近 7 天 · 30 天血糖,定制今日三餐</text>
|
||||
</view>
|
||||
<view class="ai-diet-hero-aurora" aria-hidden="true">
|
||||
<view class="ai-diet-blob ai-diet-blob-1" />
|
||||
<view class="ai-diet-blob ai-diet-blob-2" />
|
||||
<view class="ai-diet-blob ai-diet-blob-3" />
|
||||
</view>
|
||||
<view
|
||||
class="ai-diet-refresh"
|
||||
:class="{ disabled: dietAiLoading }"
|
||||
role="button"
|
||||
aria-label="换一换今日饮食建议"
|
||||
@click="refreshDietAiRecommend"
|
||||
>
|
||||
<TongjiIcon name="refresh" size="sm" color="#204e2b" />
|
||||
<text>{{ dietAiLoading ? '生成中' : '换一换' }}</text>
|
||||
<view class="ai-diet-hero-content">
|
||||
<view class="ai-diet-hero-main">
|
||||
<view class="ai-diet-hero-icon" :class="{ thinking: dietAiLoading }" aria-hidden="true">
|
||||
<view class="ai-diet-hero-icon-ring" />
|
||||
<TongjiIcon name="sparkles" size="md" color="#ffffff" />
|
||||
</view>
|
||||
<view class="ai-diet-hero-copy">
|
||||
<view class="ai-diet-hero-titles">
|
||||
<text class="ai-diet-title">AI 饮食建议</text>
|
||||
<view class="ai-diet-badge">
|
||||
<view class="ai-diet-badge-dot" />
|
||||
<text>智能定制</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="ai-diet-sub">读您近 7 天 · 30 天血糖,定制今日三餐</text>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="ai-diet-refresh"
|
||||
:class="{ disabled: dietAiLoading }"
|
||||
role="button"
|
||||
aria-label="换一换今日饮食建议"
|
||||
@click="refreshDietAiRecommend"
|
||||
>
|
||||
<TongjiIcon name="refresh" size="sm" color="#ffffff" />
|
||||
<text>{{ dietAiLoading ? '生成中' : '换一换' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -412,7 +426,7 @@
|
||||
<view class="ai-diet-meal-card meal-breakfast">
|
||||
<view class="ai-diet-meal-head">
|
||||
<view class="ai-diet-meal-icon" aria-hidden="true">
|
||||
<TongjiIcon name="sun" size="sm" color="#204e2b" />
|
||||
<TongjiIcon name="sun" size="sm" color="#ffffff" />
|
||||
</view>
|
||||
<text class="ai-diet-meal-label">早餐</text>
|
||||
</view>
|
||||
@@ -423,7 +437,7 @@
|
||||
<view class="ai-diet-meal-card meal-lunch">
|
||||
<view class="ai-diet-meal-head">
|
||||
<view class="ai-diet-meal-icon" aria-hidden="true">
|
||||
<TongjiIcon name="sunset" size="sm" color="#204e2b" />
|
||||
<TongjiIcon name="sunset" size="sm" color="#ffffff" />
|
||||
</view>
|
||||
<text class="ai-diet-meal-label">午餐</text>
|
||||
</view>
|
||||
@@ -434,7 +448,7 @@
|
||||
<view class="ai-diet-meal-card meal-dinner">
|
||||
<view class="ai-diet-meal-head">
|
||||
<view class="ai-diet-meal-icon" aria-hidden="true">
|
||||
<TongjiIcon name="moon" size="sm" color="#204e2b" />
|
||||
<TongjiIcon name="moon" size="sm" color="#ffffff" />
|
||||
</view>
|
||||
<text class="ai-diet-meal-label">晚餐</text>
|
||||
</view>
|
||||
@@ -6119,77 +6133,185 @@ async function onFamilyLike() {
|
||||
@import '../styles/daily-theme.scss';
|
||||
|
||||
.ai-diet-card {
|
||||
margin: 24rpx 24rpx 0;
|
||||
margin: 28rpx 24rpx 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 28rpx;
|
||||
border: 1rpx solid var(--border-soft);
|
||||
box-shadow: var(--shadow-premium);
|
||||
border-radius: 34rpx;
|
||||
border: none;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 18rpx 48rpx rgba(14, 138, 138, 0.14), 0 6rpx 16rpx rgba(32, 78, 43, 0.06);
|
||||
}
|
||||
|
||||
/* ===== Hero:清新极光渐变 ===== */
|
||||
.ai-diet-hero {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: 32rpx 26rpx;
|
||||
background: linear-gradient(135deg, #1f6f4a 0%, #0d8a82 58%, #14b8a6 100%);
|
||||
}
|
||||
.ai-diet-hero-aurora {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.ai-diet-blob {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.ai-diet-blob-1 {
|
||||
width: 280rpx;
|
||||
height: 280rpx;
|
||||
top: -120rpx;
|
||||
right: -60rpx;
|
||||
background: radial-gradient(circle, rgba(94, 234, 212, 0.9) 0%, rgba(94, 234, 212, 0) 70%);
|
||||
animation: ai-diet-float 7s ease-in-out infinite;
|
||||
}
|
||||
.ai-diet-blob-2 {
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
bottom: -110rpx;
|
||||
left: -50rpx;
|
||||
background: radial-gradient(circle, rgba(165, 243, 252, 0.8) 0%, rgba(165, 243, 252, 0) 70%);
|
||||
animation: ai-diet-float 9s ease-in-out infinite reverse;
|
||||
}
|
||||
.ai-diet-blob-3 {
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
top: 6rpx;
|
||||
left: 42%;
|
||||
background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%);
|
||||
animation: ai-diet-float 11s ease-in-out infinite;
|
||||
}
|
||||
@keyframes ai-diet-float {
|
||||
0%, 100% { transform: translate(0, 0); }
|
||||
50% { transform: translate(-16rpx, 16rpx); }
|
||||
}
|
||||
.ai-diet-hero-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16rpx;
|
||||
padding: 28rpx 24rpx 24rpx;
|
||||
background: linear-gradient(135deg, var(--primary-light) 0%, #f0faf4 55%, #ffffff 100%);
|
||||
border-bottom: 1rpx solid var(--border-soft);
|
||||
}
|
||||
.ai-diet-hero-main {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 16rpx;
|
||||
align-items: center;
|
||||
gap: 18rpx;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.ai-diet-hero-icon {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 20rpx;
|
||||
background: var(--primary-grad);
|
||||
box-shadow: var(--shadow-glow-primary);
|
||||
border-radius: 24rpx;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.4);
|
||||
box-shadow: 0 8rpx 22rpx rgba(0, 0, 0, 0.14), inset 0 1rpx 0 rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
.ai-diet-hero-icon-ring {
|
||||
position: absolute;
|
||||
top: -8rpx;
|
||||
left: -8rpx;
|
||||
right: -8rpx;
|
||||
bottom: -8rpx;
|
||||
border-radius: 30rpx;
|
||||
border: 3rpx solid rgba(255, 255, 255, 0.5);
|
||||
opacity: 0;
|
||||
}
|
||||
.ai-diet-hero-icon.thinking .ai-diet-hero-icon-ring {
|
||||
animation: ai-diet-ring 1.6s ease-out infinite;
|
||||
}
|
||||
@keyframes ai-diet-ring {
|
||||
0% { opacity: 0.7; transform: scale(0.82); }
|
||||
100% { opacity: 0; transform: scale(1.28); }
|
||||
}
|
||||
.ai-diet-hero-copy {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.ai-diet-hero-titles {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.ai-diet-title {
|
||||
display: block;
|
||||
font-size: 34rpx;
|
||||
font-size: 38rpx;
|
||||
font-weight: 800;
|
||||
color: var(--text-primary);
|
||||
color: #ffffff;
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.25;
|
||||
text-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
.ai-diet-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7rpx;
|
||||
padding: 5rpx 16rpx;
|
||||
border-radius: 999rpx;
|
||||
background: rgba(255, 255, 255, 0.22);
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
.ai-diet-badge text {
|
||||
font-size: 20rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
letter-spacing: 0.5rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.ai-diet-badge-dot {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: #a7f3d0;
|
||||
box-shadow: 0 0 10rpx #6ee7b7;
|
||||
animation: ai-diet-pulse 1.4s ease-in-out infinite;
|
||||
}
|
||||
@keyframes ai-diet-pulse {
|
||||
0%, 100% { opacity: 1; transform: scale(1); }
|
||||
50% { opacity: 0.35; transform: scale(0.7); }
|
||||
}
|
||||
.ai-diet-sub {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
margin-top: 12rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
color: var(--text-secondary);
|
||||
color: rgba(255, 255, 255, 0.88);
|
||||
}
|
||||
.ai-diet-refresh {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
min-height: 64rpx;
|
||||
padding: 0 20rpx;
|
||||
min-height: 60rpx;
|
||||
padding: 0 22rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #ffffff;
|
||||
border: 2rpx solid var(--border-soft);
|
||||
color: var(--primary);
|
||||
background: rgba(255, 255, 255, 0.22);
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.42);
|
||||
color: #ffffff;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 4rpx 12rpx rgba(32, 78, 43, 0.06);
|
||||
box-shadow: 0 4rpx 14rpx rgba(0, 0, 0, 0.1);
|
||||
transition: opacity 0.2s ease, background 0.2s ease;
|
||||
}
|
||||
.ai-diet-refresh.disabled {
|
||||
opacity: 0.55;
|
||||
opacity: 0.6;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.ai-diet-blob,
|
||||
.ai-diet-hero-icon.thinking .ai-diet-hero-icon-ring,
|
||||
.ai-diet-badge-dot {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== 建议依据:近7天 / 近30天 血糖回顾 ===== */
|
||||
@@ -6325,11 +6447,23 @@ async function onFamilyLike() {
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
.ai-diet-section-title {
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 800;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: 0.5rpx;
|
||||
}
|
||||
.ai-diet-section-title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 4rpx;
|
||||
bottom: 4rpx;
|
||||
width: 8rpx;
|
||||
border-radius: 8rpx;
|
||||
background: linear-gradient(180deg, #10b981 0%, #14b8a6 100%);
|
||||
}
|
||||
.ai-diet-section-tag {
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
@@ -6402,44 +6536,69 @@ async function onFamilyLike() {
|
||||
gap: 12rpx;
|
||||
}
|
||||
.ai-diet-meal-card {
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
position: relative;
|
||||
padding: 22rpx 22rpx 22rpx 26rpx;
|
||||
border-radius: 22rpx;
|
||||
background: var(--surface);
|
||||
border: 1rpx solid var(--border-soft);
|
||||
border-left-width: 6rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ai-diet-meal-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 8rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.ai-diet-meal-card.meal-breakfast {
|
||||
border-left-color: #d97706;
|
||||
background: linear-gradient(90deg, rgba(217, 119, 6, 0.06) 0%, #ffffff 28%);
|
||||
background: linear-gradient(120deg, rgba(251, 191, 36, 0.14) 0%, rgba(255, 255, 255, 0) 45%);
|
||||
}
|
||||
.ai-diet-meal-card.meal-breakfast::before {
|
||||
background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
|
||||
}
|
||||
.ai-diet-meal-card.meal-lunch {
|
||||
border-left-color: var(--primary);
|
||||
background: linear-gradient(90deg, var(--primary-glow) 0%, #ffffff 28%);
|
||||
background: linear-gradient(120deg, rgba(16, 185, 129, 0.16) 0%, rgba(255, 255, 255, 0) 45%);
|
||||
}
|
||||
.ai-diet-meal-card.meal-lunch::before {
|
||||
background: linear-gradient(180deg, #10b981 0%, #0d8a82 100%);
|
||||
}
|
||||
.ai-diet-meal-card.meal-dinner {
|
||||
border-left-color: #4f46e5;
|
||||
background: linear-gradient(90deg, rgba(79, 70, 229, 0.06) 0%, #ffffff 28%);
|
||||
background: linear-gradient(120deg, rgba(99, 102, 241, 0.14) 0%, rgba(255, 255, 255, 0) 45%);
|
||||
}
|
||||
.ai-diet-meal-card.meal-dinner::before {
|
||||
background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
|
||||
}
|
||||
.ai-diet-meal-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.ai-diet-meal-icon {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 12rpx;
|
||||
background: var(--primary-light);
|
||||
border-radius: 14rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.meal-breakfast .ai-diet-meal-icon {
|
||||
background: linear-gradient(150deg, #fde68a 0%, #fbbf24 100%);
|
||||
}
|
||||
.meal-lunch .ai-diet-meal-icon {
|
||||
background: linear-gradient(150deg, #6ee7b7 0%, #10b981 100%);
|
||||
}
|
||||
.meal-dinner .ai-diet-meal-icon {
|
||||
background: linear-gradient(150deg, #c7d2fe 0%, #818cf8 100%);
|
||||
}
|
||||
.ai-diet-meal-label {
|
||||
font-size: 26rpx;
|
||||
font-weight: 800;
|
||||
color: var(--primary);
|
||||
letter-spacing: 1rpx;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.ai-diet-meal-text {
|
||||
display: block;
|
||||
@@ -6520,9 +6679,9 @@ async function onFamilyLike() {
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
.ai-diet-btn.primary {
|
||||
background: var(--primary-grad);
|
||||
background: linear-gradient(135deg, #1f6f4a 0%, #0d8a82 55%, #14b8a6 100%);
|
||||
color: #ffffff;
|
||||
box-shadow: var(--shadow-glow-primary);
|
||||
box-shadow: 0 10rpx 22rpx rgba(14, 138, 138, 0.28);
|
||||
border: none;
|
||||
}
|
||||
.ai-diet-btn.ghost {
|
||||
@@ -6717,11 +6876,11 @@ async function onFamilyLike() {
|
||||
gap: 6rpx;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 16rpx;
|
||||
background: var(--primary-grad);
|
||||
background: linear-gradient(135deg, #1f6f4a 0%, #0d8a82 55%, #14b8a6 100%);
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
box-shadow: var(--shadow-glow-primary);
|
||||
box-shadow: 0 8rpx 18rpx rgba(14, 138, 138, 0.26);
|
||||
}
|
||||
.ai-diet-ask-btn.disabled {
|
||||
opacity: 0.55;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user