|
|
@@ -144,15 +144,14 @@
|
|
|
<view class="section">
|
|
|
<view class="progress-card">
|
|
|
<view class="progress-header">
|
|
|
- <text class="progress-title">今日干预</text>
|
|
|
+ <text class="progress-title">今日干预进度</text>
|
|
|
<text class="progress-date">{{ todayDate }}</text>
|
|
|
</view>
|
|
|
- <view class="progress-grid">
|
|
|
- <view class="progress-grid-item" v-for="(item, idx) in progressItems" :key="getProgressKey(item)" @click="handleProgressClick(item)">
|
|
|
- <text class="progress-grid-icon">{{ item.icon }}</text>
|
|
|
- <text class="progress-grid-label">{{ item.label }}</text>
|
|
|
- <text class="progress-grid-status" :class="item.done ? 'status-done' : 'status-pending'">{{ item.done ? '✔' : (item.actionText || '去记录') }}</text>
|
|
|
- </view>
|
|
|
+ <view class="progress-item" v-for="(item, idx) in progressItems" :key="getProgressKey(item)">
|
|
|
+ <text class="progress-icon">{{ item.icon }}</text>
|
|
|
+ <text class="progress-label">{{ item.label }}</text>
|
|
|
+ <text class="progress-status" :class="item.done ? 'status-done' : 'status-pending'">{{ item.done ? '✔ 已完成' : '' }}</text>
|
|
|
+ <text class="progress-btn" v-if="!item.done" @click="handleProgressClick(item)">{{ item.actionText || '补录' }}</text>
|
|
|
</view>
|
|
|
<view class="progress-footer">
|
|
|
<text class="footer-text">今日完成 {{ doneCount }}/{{ totalCount }}</text>
|
|
|
@@ -170,19 +169,9 @@
|
|
|
<text class="action-arrow">›</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="section">
|
|
|
- <view class="action-card" @click="goToDiet">
|
|
|
- <text class="action-icon">🍽️</text>
|
|
|
- <view class="action-info">
|
|
|
- <text class="action-title">饮食主页</text>
|
|
|
- <text class="action-desc">今日共餐 · 食材推荐 · 饮食记录</text>
|
|
|
- </view>
|
|
|
- <text class="action-arrow">›</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
<view class="section">
|
|
|
<view class="action-card" @click="goToFoods">
|
|
|
- <text class="action-icon">🥗</text>
|
|
|
+ <text class="action-icon">🍽️</text>
|
|
|
<view class="action-info">
|
|
|
<text class="action-title">饮食推荐</text>
|
|
|
<text class="action-desc">基于菌群报告的个性化食材建议</text>
|
|
|
@@ -191,36 +180,17 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view class="section">
|
|
|
- <view class="diet-card">
|
|
|
- <view class="diet-card-header">
|
|
|
- <text class="diet-card-title">🥬 今日推荐食材</text>
|
|
|
- <text class="diet-card-link" @click="goToDiet">饮食主页 ›</text>
|
|
|
- </view>
|
|
|
- <view class="diet-card-content" v-if="ingredients.length > 0">
|
|
|
- <view class="diet-item" v-for="(item, index) in ingredients" :key="getIngredientKey(item, index)">
|
|
|
- <text class="ing-name">{{ item.name }}</text>
|
|
|
- <text class="ing-reason" v-if="item.reason">{{ item.reason }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="diet-empty" v-else>
|
|
|
- <text class="empty-text">{{ ingredientsLoading ? '加载中...' : '暂无推荐食材' }}</text>
|
|
|
- <text class="empty-hint" v-if="!ingredientsLoading">上传菌群报告后生成个性化推荐</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
<!-- 推荐文章 -->
|
|
|
<view class="section" v-if="healthArticles.length > 0 || growthArticles.length > 0">
|
|
|
<view class="rec-section-title">📖 推荐阅读</view>
|
|
|
- <view class="rec-card" v-for="item in healthArticles" :key="getArticleKey(item)" @click="goToArticle(item.id)">
|
|
|
+ <view class="rec-card" v-for="item in healthArticles" :key="'ha'+item.id" @click="goToArticle(item.id)">
|
|
|
<image class="rec-img" :src="item.coverImage" mode="aspectFill" v-if="item.coverImage"/>
|
|
|
<view class="rec-info">
|
|
|
<text class="rec-title">{{ item.title }}</text>
|
|
|
<text class="rec-desc">{{ item.summary }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="rec-card" v-for="item in growthArticles" :key="getArticleKey(item)" @click="goToArticle(item.id)">
|
|
|
+ <view class="rec-card" v-for="item in growthArticles" :key="'ga'+item.id" @click="goToArticle(item.id)">
|
|
|
<image class="rec-img" :src="item.coverImage" mode="aspectFill" v-if="item.coverImage"/>
|
|
|
<view class="rec-info">
|
|
|
<text class="rec-title">{{ item.title }}</text>
|
|
|
@@ -232,14 +202,14 @@
|
|
|
<!-- 推荐商品 -->
|
|
|
<view class="section" v-if="healthProducts.length > 0 || growthProducts.length > 0">
|
|
|
<view class="rec-section-title">🛒 推荐商品</view>
|
|
|
- <view class="rec-product" v-for="item in healthProducts" :key="getProductKey(item)" @click="goToProduct(item.id)">
|
|
|
+ <view class="rec-product" v-for="item in healthProducts" :key="'hp'+item.id" @click="goToProduct(item.id)">
|
|
|
<image class="rec-pimg" :src="item.coverImage" mode="aspectFill"/>
|
|
|
<view class="rec-pinfo">
|
|
|
<text class="rec-pname">{{ item.name }}</text>
|
|
|
<text class="rec-pdesc">{{ item.intro || item.description || '' }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="rec-product" v-for="item in growthProducts" :key="getProductKey(item)" @click="goToProduct(item.id)">
|
|
|
+ <view class="rec-product" v-for="item in growthProducts" :key="'gp'+item.id" @click="goToProduct(item.id)">
|
|
|
<image class="rec-pimg" :src="item.coverImage" mode="aspectFill"/>
|
|
|
<view class="rec-pinfo">
|
|
|
<text class="rec-pname">{{ item.name }}</text>
|
|
|
@@ -249,23 +219,23 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="section">
|
|
|
- <view class="section-title-row">📊 记录概览</view>
|
|
|
- <view class="record-grid">
|
|
|
- <view class="record-card" v-for="tab in trackingTabs" :key="tab.key" @click="viewAllRecordsByType(tab.key)">
|
|
|
- <view class="record-card-header">
|
|
|
- <text class="record-card-icon">{{ tab.icon }}</text>
|
|
|
- <text class="record-card-label">{{ tab.label }}</text>
|
|
|
+ <view class="tracking-card">
|
|
|
+ <view class="tracking-tabs">
|
|
|
+ <view class="tracking-tab" :class="activeTab === tab.key ? 'tab-active' : ''" v-for="tab in trackingTabs" :key="tab.key" @click="switchTab(tab.key)">
|
|
|
+ <text class="tab-text" :class="activeTab === tab.key ? 'tab-active-text' : ''">{{ tab.label }}</text>
|
|
|
</view>
|
|
|
- <view class="record-card-body" v-if="(trackingData[tab.key] || []).length > 0">
|
|
|
- <view class="record-card-item" v-for="(rec, rIdx) in (trackingData[tab.key] || []).slice(0, 2)" :key="getRecordKey(rec)">
|
|
|
- <text class="record-card-date">{{ rec._date || rec._text }}</text>
|
|
|
- <text class="record-card-content">{{ rec._content }}</text>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ <view class="tracking-content">
|
|
|
+ <view class="tracking-empty" v-if="currentRecords.length === 0">
|
|
|
+ <text class="empty-icon">📊</text>
|
|
|
+ <text class="empty-text">还没有记录</text>
|
|
|
+ <text class="empty-hint">开始记录{{ activeTabLabel }}吧</text>
|
|
|
</view>
|
|
|
- <view class="record-card-empty" v-else>
|
|
|
- <text class="empty-text">暂无记录</text>
|
|
|
+ <view class="tracking-record" v-for="(rec, rIdx) in currentRecords" :key="getRecordKey(rec)">
|
|
|
+ <text class="record-date">{{ rec._date || rec._text }}</text>
|
|
|
+ <text class="record-content">{{ rec._content }}</text>
|
|
|
</view>
|
|
|
- <view class="record-card-footer">查看全部 ›</view>
|
|
|
+ <view class="tracking-more" v-if="currentRecords.length > 0" @click="viewAllRecords">查看全部 ›</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -319,20 +289,20 @@
|
|
|
import PageBanner from '../../components/PageBanner.vue'
|
|
|
import LoginGuideCard from '../../components/LoginGuideCard.vue'
|
|
|
import DimensionActivities from '../../components/DimensionActivities.vue'
|
|
|
-import { healthCheckinList, getDietDailyRecords, getDietIngredients, getSurveyStatus, getSurveyHistory, getFoodCautionList, getGrowthRecommendations, getExerciseList, getMindCheckinList } from '../../utils/api.js'
|
|
|
+import { healthCheckinList, getDietDailyRecords, getSurveyStatus, getSurveyHistory, getFoodCautionList, getGrowthRecommendations } from '../../utils/api.js'
|
|
|
export default {
|
|
|
components: { PageBanner, LoginGuideCard, DimensionActivities },
|
|
|
- data() { return { memberId: '', todayDate: '', hasIncomplete: false, incompleteCount: 0, progressItems: [], trackingTabs: [{ key: 'diet', label: '饮食', icon: '🍽️' }, { key: 'exercise', label: '运动', icon: '🏃' }, { key: 'sleep', label: '睡眠', icon: '😴' }, { key: 'emotion', label: '心情', icon: '😊' }], trackingData: { diet: [], exercise: [], sleep: [], emotion: [] }, streakDays: 0, activeChallenges: 0, completeness: 0, cautionCount: 0,
|
|
|
+ data() { return { memberId: '', todayDate: '', hasIncomplete: false, incompleteCount: 0, progressItems: [], activeTab: 'diet', trackingTabs: [{ key: 'diet', label: '饮食' }, { key: 'exercise', label: '运动' }, { key: 'sleep', label: '睡眠' }, { key: 'emotion', label: '心情' }], trackingData: { diet: [], exercise: [], sleep: [], emotion: [] }, streakDays: 0, activeChallenges: 0, completeness: 0, cautionCount: 0,
|
|
|
healthArticles: [],
|
|
|
healthProducts: [],
|
|
|
growthArticles: [],
|
|
|
growthProducts: [],
|
|
|
- pendingSurvey: null, allDone: false, surveyHistory: [], isLoggedIn: false,
|
|
|
- ingredients: [],
|
|
|
- ingredientsLoading: false } },
|
|
|
+ pendingSurvey: null, allDone: false, surveyHistory: [], isLoggedIn: false } },
|
|
|
computed: {
|
|
|
doneCount: function() { var c = 0; for (var i = 0; i < this.progressItems.length; i++) if (this.progressItems[i] && this.progressItems[i].done) c++; return c },
|
|
|
- totalCount: function() { return this.progressItems.length }
|
|
|
+ totalCount: function() { return this.progressItems.length },
|
|
|
+ activeTabLabel: function() { var m = { diet: '饮食', exercise: '运动', sleep: '睡眠', emotion: '心情' }; return m[this.activeTab] || '' },
|
|
|
+ currentRecords: function() { return this.trackingData[this.activeTab] || [] }
|
|
|
},
|
|
|
onShow() {
|
|
|
this.isLoggedIn = !!uni.getStorageSync('token')
|
|
|
@@ -347,18 +317,12 @@ export default {
|
|
|
pad: function(n) { return n < 10 ? '0' + n : '' + n },
|
|
|
getProgressKey: function(item) { return item && item.label ? item.label : 'p-' + Math.random() },
|
|
|
getRecordKey: function(rec) { return rec && rec._text ? rec._text + rec._content : 'r-' + Math.random() },
|
|
|
- getIngredientKey: function(item, index) { return 'ing-' + (item.id || index) },
|
|
|
getHistoryKey: function(h) { return h && h._date ? h._date + h._content : 'h-' + Math.random() },
|
|
|
- getArticleKey: function(item) { return item && item.id ? 'a' + item.id : 'a-' + Math.random() },
|
|
|
- getProductKey: function(item) { return item && item.id ? 'p' + item.id : 'p-' + Math.random() },
|
|
|
dismissReminder: function() { this.hasIncomplete = false },
|
|
|
- viewAllRecordsByType: function(key) {
|
|
|
- var m = { diet: '/pages/health/diet-index', exercise: '/pages/health/exercise-index', sleep: '/pages/health/sleep-index', emotion: '/pages/mind-detail/emotion-checkin' }
|
|
|
- if (m[key]) uni.navigateTo({ url: m[key] })
|
|
|
- },
|
|
|
+ switchTab: function(key) { this.activeTab = key; this.loadTrackingData(key) },
|
|
|
handleProgressClick: function(item) {
|
|
|
if (!item || !item.key) return
|
|
|
- var m = { checkin: '/pages/health/daily-checkin', diet: '/pages/health/diet-index', exercise: '/pages/health/exercise-index', sleep: '/pages/health/sleep-index', emotion: '/pages/mind-detail/emotion-checkin' }
|
|
|
+ var m = { checkin: '/pages/health/daily-checkin', diet: '/pages/health/diet-index', exercise: '/pages/health/exercise-index', sleep: '/pages/health/sleep-index', emotion: '/pages/mind/index' }
|
|
|
var url = m[item.key]
|
|
|
if (item.key === 'survey' && this.pendingSurvey && this.pendingSurvey.templateId) {
|
|
|
url = '/pages/health/survey-questionnaire?templateId=' + this.pendingSurvey.templateId + '&templateTitle=' + encodeURIComponent(this.pendingSurvey.title) + '&templateDimension=' + (this.pendingSurvey.dimension || '')
|
|
|
@@ -366,24 +330,24 @@ export default {
|
|
|
if (url) uni.navigateTo({ url: url })
|
|
|
},
|
|
|
startSurvey: function() { if (this.pendingSurvey && this.pendingSurvey.templateId) uni.navigateTo({ url: '/pages/health/survey-questionnaire?templateId=' + this.pendingSurvey.templateId + '&templateTitle=' + encodeURIComponent(this.pendingSurvey.title) + '&templateDimension=' + (this.pendingSurvey.dimension || '') }) },
|
|
|
+ viewAllRecords: function() { var m = { diet: '/pages/health/diet-index', exercise: '/pages/health/exercise-index', sleep: '/pages/health/sleep-index', emotion: '/pages/mind/index' }; if (m[this.activeTab]) uni.navigateTo({ url: m[this.activeTab] }) },
|
|
|
viewAllHistory: function() { uni.navigateTo({ url: '/pages/health/survey-history?memberId=' + this.memberId }) },
|
|
|
goActivityDetail: function(act) { uni.navigateTo({ url: '/pages/activity/activity-detail/activity-detail?id=' + act.id }) },
|
|
|
goMoreActivities: function() { uni.navigateTo({ url: '/pages/activity/index' }) },
|
|
|
handleGuestFeatureTap: function() { uni.showToast({ title: '登录后即可体验该功能', icon: 'none' }) },
|
|
|
goToCaution: function() { uni.navigateTo({ url: '/pages/growth/caution-detail' }) },
|
|
|
- goToDiet: function() { uni.navigateTo({ url: '/pages/diet/index' }) },
|
|
|
goToFoods: function() { uni.navigateTo({ url: '/pages/growth/foods-detail' }) },
|
|
|
goToArticle: function(id) { uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + id }) },
|
|
|
goToProduct: function(id) { uni.navigateTo({ url: '/pages/shop/detail/detail?id=' + id }) },
|
|
|
goPage: function(url) { uni.navigateTo({ url: url }) },
|
|
|
+ loadTrackingData: function(key) { return this.trackingData[key] || [] },
|
|
|
async loadAllData() {
|
|
|
var self = this
|
|
|
- self.loadProgressItems()
|
|
|
- self.loadSurveyData()
|
|
|
- self.loadGrowthRecommendations()
|
|
|
- self.loadCautionData()
|
|
|
- self.loadMilestones()
|
|
|
- self.loadDietIngredients()
|
|
|
+ try { await self.loadProgressItems() } catch(e) {}
|
|
|
+ try { await self.loadCautionData() } catch(e) {}
|
|
|
+ try { await self.loadGrowthRecommendations() } catch(e) {}
|
|
|
+ try { await self.loadSurveyData() } catch(e) {}
|
|
|
+ try { await self.loadMilestones() } catch(e) {}
|
|
|
},
|
|
|
async loadProgressItems() {
|
|
|
var self = this
|
|
|
@@ -402,22 +366,8 @@ export default {
|
|
|
if (dRes.code === 200 && dRes.data && dRes.data.length > 0) dietDone = true
|
|
|
} catch(e) {}
|
|
|
items.push({ key: 'diet', icon: '🍽️', label: '饮食记录', done: dietDone, actionText: '补录' })
|
|
|
- var exerciseDone = false
|
|
|
- try {
|
|
|
- var exRes = await getExerciseList({})
|
|
|
- if (exRes.code === 200 && exRes.data && exRes.data.length > 0) {
|
|
|
- for (var ex = 0; ex < exRes.data.length; ex++) { var exRec = exRes.data[ex]; if (exRec && exRec.startTime && typeof exRec.startTime === 'string' && exRec.startTime.substring(0, 10) === self.todayDate) { exerciseDone = true; break } }
|
|
|
- }
|
|
|
- } catch(e) {}
|
|
|
- items.push({ key: 'exercise', icon: '🏃', label: '运动记录', done: exerciseDone, actionText: '记录' })
|
|
|
- var emotionDone = false
|
|
|
- try {
|
|
|
- var emRes = await getMindCheckinList({ page: 1, size: 20 })
|
|
|
- if (emRes.code === 200 && emRes.data && emRes.data.length > 0) {
|
|
|
- for (var em = 0; em < emRes.data.length; em++) { var emRec = emRes.data[em]; if (emRec && emRec.checkinDate && typeof emRec.checkinDate === 'string' && emRec.checkinDate.substring(0, 10) === self.todayDate) { emotionDone = true; break } }
|
|
|
- }
|
|
|
- } catch(e) {}
|
|
|
- items.push({ key: 'emotion', icon: '😊', label: '心情记录', done: emotionDone, actionText: '记录' })
|
|
|
+ items.push({ key: 'exercise', icon: '🏃', label: '运动记录', done: false, actionText: '记录' })
|
|
|
+ items.push({ key: 'emotion', icon: '😊', label: '心情记录', done: false, actionText: '记录' })
|
|
|
items.push({ key: 'survey', icon: '📋', label: '本周调研', done: self.allDone, actionText: self.allDone ? '' : '开始' })
|
|
|
self.progressItems = items.filter(function(it) { return it && it.key })
|
|
|
self.incompleteCount = 0
|
|
|
@@ -473,17 +423,6 @@ export default {
|
|
|
} catch(e) {}
|
|
|
self.activeChallenges = 0
|
|
|
self.completeness = self.streakDays > 0 ? Math.min(100, Math.round(self.streakDays * 10)) : 0
|
|
|
- },
|
|
|
- async loadDietIngredients() {
|
|
|
- var self = this
|
|
|
- self.ingredientsLoading = true
|
|
|
- try {
|
|
|
- var res = await getDietIngredients()
|
|
|
- self.ingredientsLoading = false
|
|
|
- if (res && res.ingredients) {
|
|
|
- self.ingredients = res.ingredients
|
|
|
- }
|
|
|
- } catch(e) { self.ingredientsLoading = false; console.error('loadDietIngredients error:', e) }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -544,45 +483,33 @@ export default {
|
|
|
.progress-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16rpx}
|
|
|
.progress-title{font-size:28rpx;font-weight:bold;color:#333}
|
|
|
.progress-date{font-size:22rpx;color:#999}
|
|
|
-.progress-grid{display:flex;flex-wrap:wrap;gap:12rpx}
|
|
|
-.progress-grid-item{width:calc(33.33% - 8rpx);box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#FFF7ED;border-radius:16rpx;padding:20rpx 12rpx;border:1rpx solid rgba(249,115,22,0.12)}
|
|
|
-.progress-grid-item:active{opacity:0.85;background:#FFEDD5}
|
|
|
-.progress-grid-icon{font-size:40rpx;margin-bottom:8rpx}
|
|
|
-.progress-grid-label{font-size:24rpx;color:#333;margin-bottom:8rpx;text-align:center}
|
|
|
-.progress-grid-status{font-size:20rpx;flex-shrink:0}
|
|
|
+.progress-item{display:flex;align-items:center;padding:12rpx 0;border-bottom:1rpx solid #f5f5f5}
|
|
|
+.progress-item:last-of-type{border-bottom:none}
|
|
|
+.progress-icon{font-size:28rpx;margin-right:12rpx;flex-shrink:0}
|
|
|
+.progress-label{font-size:26rpx;color:#333;flex:1}
|
|
|
+.progress-status{font-size:22rpx;margin-right:8rpx;flex-shrink:0}
|
|
|
.status-done{color:#10B981}
|
|
|
-.status-pending{color:#F97316}
|
|
|
+.status-pending{color:#ccc}
|
|
|
+.progress-btn{font-size:22rpx;color:#F97316;padding:4rpx 16rpx;border:1rpx solid #F97316;border-radius:20rpx;flex-shrink:0}
|
|
|
.progress-footer{display:flex;justify-content:space-between;align-items:center;margin-top:16rpx;padding-top:16rpx;border-top:1rpx solid #f5f5f5}
|
|
|
.footer-text{font-size:24rpx;color:#666;font-weight:bold}
|
|
|
.footer-streak{font-size:24rpx;color:#F97316;font-weight:bold}
|
|
|
-/* 记录概览:平铺卡片 */
|
|
|
-.record-grid{display:flex;flex-wrap:wrap;justify-content:space-between}
|
|
|
-.record-card{width:calc(50% - 8rpx);box-sizing:border-box;background:#fff;border-radius:20rpx;padding:20rpx;margin-bottom:16rpx;box-shadow:0 2rpx 12rpx rgba(0,0,0,0.06)}
|
|
|
-.record-card:active{opacity:0.85}
|
|
|
-.record-card-header{display:flex;align-items:center;margin-bottom:12rpx}
|
|
|
-.record-card-icon{font-size:32rpx;margin-right:8rpx}
|
|
|
-.record-card-label{font-size:26rpx;font-weight:bold;color:#333}
|
|
|
-.record-card-body{display:flex;flex-direction:column}
|
|
|
-.record-card-item{display:flex;flex-direction:column;padding:10rpx 0;border-bottom:1rpx solid #f7f7f7}
|
|
|
-.record-card-item:last-child{border-bottom:none}
|
|
|
-.record-card-date{font-size:20rpx;color:#999;margin-bottom:2rpx}
|
|
|
-.record-card-content{font-size:24rpx;color:#666;overflow:hidden;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}
|
|
|
-.record-card-empty{display:flex;align-items:center;justify-content:center;padding:24rpx 0}
|
|
|
-.record-card-empty .empty-text{font-size:22rpx;color:#bbb}
|
|
|
-.record-card-footer{font-size:22rpx;color:#F97316;text-align:right;padding-top:10rpx}
|
|
|
-/* 今日推荐食材 */
|
|
|
-.diet-card{background:#fff;border-radius:20rpx;padding:24rpx;box-shadow:0 2rpx 12rpx rgba(0,0,0,0.06)}
|
|
|
-.diet-card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16rpx}
|
|
|
-.diet-card-title{font-size:28rpx;font-weight:bold;color:#333}
|
|
|
-.diet-card-link{font-size:24rpx;color:#F97316}
|
|
|
-.diet-card-content{display:flex;flex-direction:column}
|
|
|
-.diet-item{display:flex;flex-direction:column;padding:16rpx 0;border-bottom:1rpx solid #f5f5f5}
|
|
|
-.diet-item:last-child{border-bottom:none}
|
|
|
-.ing-name{font-size:26rpx;font-weight:bold;color:#333;margin-bottom:4rpx}
|
|
|
-.ing-reason{font-size:22rpx;color:#888}
|
|
|
-.diet-empty{display:flex;flex-direction:column;align-items:center;padding:40rpx 0}
|
|
|
-.diet-empty .empty-text{font-size:26rpx;color:#999}
|
|
|
-.diet-empty .empty-hint{font-size:22rpx;color:#ccc;margin-top:8rpx}
|
|
|
+.tracking-card{background:#fff;border-radius:20rpx;padding:24rpx;box-shadow:0 2rpx 12rpx rgba(0,0,0,0.06)}
|
|
|
+.tracking-tabs{display:flex;margin-bottom:16rpx}
|
|
|
+.tracking-tab{flex:1;text-align:center;padding:10rpx 0;border-radius:20rpx;margin-right:8rpx;background:#FFF7ED}
|
|
|
+.tracking-tab:last-child{margin-right:0}
|
|
|
+.tab-active{background:#F97316}
|
|
|
+.tab-text{font-size:24rpx;color:#666}
|
|
|
+.tab-active-text{color:#fff;font-weight:bold}
|
|
|
+.tracking-content{min-height:200rpx}
|
|
|
+.tracking-empty{display:flex;flex-direction:column;align-items:center;padding:60rpx 0}
|
|
|
+.empty-icon{font-size:60rpx;margin-bottom:12rpx}
|
|
|
+.empty-text{font-size:26rpx;color:#999}
|
|
|
+.empty-hint{font-size:22rpx;color:#ccc;margin-top:8rpx}
|
|
|
+.tracking-record{display:flex;align-items:center;padding:10rpx 0;border-bottom:1rpx solid #f5f5f5}
|
|
|
+.record-date{font-size:22rpx;color:#999;width:120rpx;flex-shrink:0}
|
|
|
+.record-content{font-size:24rpx;color:#333;flex:1}
|
|
|
+.tracking-more{text-align:right;font-size:24rpx;color:#F97316;padding:12rpx 0 0 0}
|
|
|
.milestone-card{background:#fff;border-radius:20rpx;padding:24rpx;box-shadow:0 2rpx 12rpx rgba(0,0,0,0.06)}
|
|
|
.section-title-row{font-size:26rpx;font-weight:bold;color:#333;margin-bottom:16rpx;display:block}
|
|
|
.milestone-grid{display:flex;justify-content:space-between}
|