|
|
@@ -39,47 +39,6 @@
|
|
|
<text class="gg-case-note">通过饮食记录 + 睡眠打卡,免疫力显著提升。</text>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 成长功能预览:列表式 4 行(非等权砖) -->
|
|
|
- <view class="gg-block">
|
|
|
- <view class="gg-tag-row">
|
|
|
- <text class="gg-tag">成长功能预览</text>
|
|
|
- </view>
|
|
|
- <view class="gg-rows">
|
|
|
- <view class="gg-row" @click="handleGuestFeatureTap">
|
|
|
- <view class="gg-ic gg-ic-body"></view>
|
|
|
- <view class="gg-row-info">
|
|
|
- <text class="gg-row-name">每日打卡</text>
|
|
|
- <text class="gg-row-sub">饮食 · 运动 · 睡眠 · 心情</text>
|
|
|
- </view>
|
|
|
- <view class="gg-row-chev"></view>
|
|
|
- </view>
|
|
|
- <view class="gg-row" @click="handleGuestFeatureTap">
|
|
|
- <view class="gg-ic gg-ic-wisdom"></view>
|
|
|
- <view class="gg-row-info">
|
|
|
- <text class="gg-row-name">里程碑</text>
|
|
|
- <text class="gg-row-sub">连续打卡 · 挑战完成</text>
|
|
|
- </view>
|
|
|
- <view class="gg-row-chev"></view>
|
|
|
- </view>
|
|
|
- <view class="gg-row" @click="handleGuestFeatureTap">
|
|
|
- <view class="gg-ic gg-ic-wealth"></view>
|
|
|
- <view class="gg-row-info">
|
|
|
- <text class="gg-row-name">家庭挑战</text>
|
|
|
- <text class="gg-row-sub">全家参与的互动任务</text>
|
|
|
- </view>
|
|
|
- <view class="gg-row-chev"></view>
|
|
|
- </view>
|
|
|
- <view class="gg-row" @click="handleGuestFeatureTap">
|
|
|
- <view class="gg-ic gg-ic-action"></view>
|
|
|
- <view class="gg-row-info">
|
|
|
- <text class="gg-row-name">任务中心</text>
|
|
|
- <text class="gg-row-sub">执行任务 · 完成挑战</text>
|
|
|
- </view>
|
|
|
- <view class="gg-row-chev"></view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
<!-- 五维行动速览:精简版(不重复相生相克长文) -->
|
|
|
<view class="gg-block">
|
|
|
<view class="gg-tag-row">
|
|
|
@@ -135,40 +94,13 @@
|
|
|
</view>
|
|
|
|
|
|
<view v-else>
|
|
|
- <!-- 未完成提醒 -->
|
|
|
+ <!-- 未完成提醒(仅当有未完成) -->
|
|
|
<view class="reminder-bar" v-if="hasIncomplete">
|
|
|
<text class="reminder-text">⚠ 今日还有 {{ incompleteCount }} 项未记录</text>
|
|
|
<text class="reminder-close" @click="dismissReminder">✕</text>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 里程碑统计 -->
|
|
|
- <view class="section milestone-section">
|
|
|
- <view class="milestone-card">
|
|
|
- <view class="milestone-header">
|
|
|
- <text class="milestone-title">🏆 里程碑</text>
|
|
|
- <text class="milestone-sub">{{ todayDate }}</text>
|
|
|
- </view>
|
|
|
- <view class="milestone-grid">
|
|
|
- <view class="milestone-tile">
|
|
|
- <text class="milestone-tile-icon">🔥</text>
|
|
|
- <text class="milestone-tile-value">{{ streakDays }}</text>
|
|
|
- <text class="milestone-tile-label">连续打卡</text>
|
|
|
- </view>
|
|
|
- <view class="milestone-tile">
|
|
|
- <text class="milestone-tile-icon">🎯</text>
|
|
|
- <text class="milestone-tile-value">{{ activeChallenges }}</text>
|
|
|
- <text class="milestone-tile-label">进行中挑战</text>
|
|
|
- </view>
|
|
|
- <view class="milestone-tile">
|
|
|
- <text class="milestone-tile-icon">📈</text>
|
|
|
- <text class="milestone-tile-value">{{ completeness }}%</text>
|
|
|
- <text class="milestone-tile-label">档案完整度</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 今日成长 -->
|
|
|
+ <!-- 今日成长(主行动):5 打卡 tile + 更多任务 tile -->
|
|
|
<view class="section">
|
|
|
<view class="progress-card">
|
|
|
<view class="progress-header">
|
|
|
@@ -194,48 +126,41 @@
|
|
|
<text class="progress-tile-status status-more">去查看 ›</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="streak-footer" v-if="streakDays > 0">
|
|
|
- <text class="streak-badge">🔥 连续打卡 {{ streakDays }} 天</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 饮食推荐 -->
|
|
|
- <view class="section">
|
|
|
- <view class="action-card" @click="goToFoods">
|
|
|
- <view class="action-icon-wrap warm">
|
|
|
- <text class="action-icon">🍽️</text>
|
|
|
- </view>
|
|
|
- <view class="action-info">
|
|
|
- <text class="action-title">饮食推荐</text>
|
|
|
- <text class="action-desc">选同住人,获取今日个性化饮食建议</text>
|
|
|
- </view>
|
|
|
- <text class="action-arrow">›</text>
|
|
|
+ <!-- 成长里程碑(去重:仅保留进度类 = 连续打卡,与首页/我的已区分) -->
|
|
|
+ <view class="section milestone-section" v-if="streakDays > 0">
|
|
|
+ <view class="milestone-strip">
|
|
|
+ <text class="milestone-strip-ic">🏆</text>
|
|
|
+ <text class="milestone-strip-label">成长里程碑</text>
|
|
|
+ <text class="milestone-strip-value">连续打卡 {{ streakDays }} 天</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 益智小游戏 -->
|
|
|
+ <!-- 二级入口:饮食推荐 + 益智小游戏(各一行) -->
|
|
|
<view class="section">
|
|
|
- <view class="action-card" @click="goToGames">
|
|
|
- <view class="action-icon-wrap warm">
|
|
|
- <text class="action-icon">🎮</text>
|
|
|
+ <view class="quick-entries">
|
|
|
+ <view class="quick-entry" @click="goToFoods">
|
|
|
+ <text class="quick-entry-ic">🍽️</text>
|
|
|
+ <text class="quick-entry-name">饮食推荐</text>
|
|
|
+ <text class="quick-entry-chev">›</text>
|
|
|
</view>
|
|
|
- <view class="action-info">
|
|
|
- <text class="action-title">益智小游戏</text>
|
|
|
- <text class="action-desc">舒尔特方格 · 猜数字 · 数独</text>
|
|
|
+ <view class="quick-entry" @click="goToGames">
|
|
|
+ <text class="quick-entry-ic">🎮</text>
|
|
|
+ <text class="quick-entry-name">益智小游戏</text>
|
|
|
+ <text class="quick-entry-chev">›</text>
|
|
|
</view>
|
|
|
- <text class="action-arrow">›</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 成长历史记录(按日期分组,变更B) -->
|
|
|
+ <!-- 成长历史记录(按日期分组 · 预览压缩:最多 3 组 × 3 条) -->
|
|
|
<view class="section history-group-section">
|
|
|
<view class="section-header">
|
|
|
<text class="section-title">📅 成长历史记录</text>
|
|
|
+ <text class="section-more" @click="goMoreHistory" v-if="dateGroups.length > 0">查看全部 ›</text>
|
|
|
</view>
|
|
|
- <view v-if="dateGroups.length === 0" class="history-empty">
|
|
|
- <text class="history-empty-text">暂无记录,去记录第一笔成长吧</text>
|
|
|
- </view>
|
|
|
+ <BaseEmpty v-if="dateGroups.length === 0" compact title="暂无记录,去记录第一笔成长吧" />
|
|
|
<view v-else class="history-group-list">
|
|
|
<view class="history-group" v-for="group in dateGroups" :key="group.date">
|
|
|
<view class="history-group-title">
|
|
|
@@ -249,9 +174,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <DimensionActivities :isLoggedIn="true" @activityClick="goActivityDetail" @moreActivities="goMoreActivities" style="margin-bottom:60rpx" />
|
|
|
-
|
|
|
- <!-- 推荐阅读 -->
|
|
|
+ <!-- 推荐阅读(2 条预览) -->
|
|
|
<view class="section" v-if="recommendArticles.length > 0">
|
|
|
<view class="section-header">
|
|
|
<text class="section-title">📖 推荐阅读</text>
|
|
|
@@ -260,15 +183,6 @@
|
|
|
<ArticleFeed :articles="recommendArticles" @articleClick="goToArticle" />
|
|
|
</view>
|
|
|
|
|
|
- <!-- 推荐商品(放最底部) -->
|
|
|
- <view class="section">
|
|
|
- <view class="section-header">
|
|
|
- <text class="section-title">🛍️ 推荐商品</text>
|
|
|
- <text class="section-more" @click="goMoreProducts">更多 ›</text>
|
|
|
- </view>
|
|
|
- <DimensionProducts :isLoggedIn="true" :showMore="false" layout="mall" @productClick="goToProduct" />
|
|
|
- </view>
|
|
|
-
|
|
|
<view class="bottom-spacer" style="height: 40rpx;"></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -276,8 +190,7 @@
|
|
|
|
|
|
<script>
|
|
|
import LoginGuideCard from '../../components/LoginGuideCard.vue'
|
|
|
-import DimensionActivities from '../../components/DimensionActivities.vue'
|
|
|
-import DimensionProducts from '../../components/DimensionProducts.vue'
|
|
|
+import BaseEmpty from '../../components/BaseEmpty.vue'
|
|
|
import ArticleFeed from '../../components/ArticleFeed.vue'
|
|
|
import { healthCheckinList, getHealthMealList, getGrowthRecommendations, getExerciseRecords, getSleepRecords, getEmotionCheckinList, getCheckinList, getTodayTasks, reportAppEnter, getGrowthRecordList } from '../../utils/api.js'
|
|
|
import { parseDate, recordDateOf } from '../../utils/format.js'
|
|
|
@@ -285,8 +198,8 @@ import fontScaleMixin from '@/mixins/font-scale.js'
|
|
|
import shareMixin from '../../components/share-mixin.js'
|
|
|
export default {
|
|
|
mixins: [fontScaleMixin, shareMixin],
|
|
|
- components: { LoginGuideCard, DimensionActivities, DimensionProducts, ArticleFeed },
|
|
|
- data() { return { memberId: '', todayDate: '', hasIncomplete: false, incompleteCount: 0, progressItems: [], todayTaskList: [], streakDays: 0, activeChallenges: 0, completeness: 0,
|
|
|
+ components: { LoginGuideCard, BaseEmpty, ArticleFeed },
|
|
|
+ data() { return { memberId: '', todayDate: '', hasIncomplete: false, incompleteCount: 0, progressItems: [], todayTaskList: [], streakDays: 0,
|
|
|
healthArticles: [],
|
|
|
growthArticles: [],
|
|
|
dateGroups: [],
|
|
|
@@ -298,7 +211,8 @@ export default {
|
|
|
var arr = []
|
|
|
if (this.healthArticles && this.healthArticles.length > 0) arr = arr.concat(this.healthArticles)
|
|
|
if (this.growthArticles && this.growthArticles.length > 0) arr = arr.concat(this.growthArticles)
|
|
|
- return arr
|
|
|
+ // 极致简单:本页仅预览 2 条,完整列表走「更多」进文章中心
|
|
|
+ return arr.slice(0, 2)
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
@@ -351,20 +265,15 @@ export default {
|
|
|
}
|
|
|
return null
|
|
|
},
|
|
|
- goActivityDetail: function(act) { uni.navigateTo({ url: '/pages/activity/activity-detail/activity-detail?id=' + act.id }) },
|
|
|
- goMoreActivities: function() { uni.navigateTo({ url: '/pages/activity/index' }) },
|
|
|
goToTasks: function() { uni.navigateTo({ url: '/pages/tasks/tasks' }) },
|
|
|
- handleGuestFeatureTap: function() { uni.showToast({ title: '登录后即可体验该功能', icon: 'none' }) },
|
|
|
goToFoods: function() {
|
|
|
var mid = uni.getStorageSync('currentChildId') || uni.getStorageSync('currentMemberId') || ''
|
|
|
uni.navigateTo({ url: '/pages/diet/recommendation' + (mid ? '?memberId=' + mid : '') })
|
|
|
},
|
|
|
goToGames: function() { uni.navigateTo({ url: '/pages/games/list' }) },
|
|
|
goToArticle: function(article) { var id = article && article.id ? article.id : article; if (!id) return; uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + id }) },
|
|
|
- goToProduct: function(prod) { var id = prod && prod.id ? prod.id : prod; if (!id) return; uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + id }) },
|
|
|
- goMoreProducts: function() { uni.navigateTo({ url: '/pages/shop/index/index' }) },
|
|
|
goMoreArticles: function() { uni.navigateTo({ url: '/pages/article-center/index?dimension=action' }) },
|
|
|
- goPage: function(url) { uni.navigateTo({ url: url }) },
|
|
|
+ goMoreHistory: function() { uni.navigateTo({ url: '/pages/growth/history' }) },
|
|
|
// 登录成功:刷新登录态数据(镜像 onShow 已登录分支)
|
|
|
onLoginSuccess: function() {
|
|
|
this.isLoggedIn = true
|
|
|
@@ -373,18 +282,6 @@ export default {
|
|
|
this.todayDate = now.getFullYear() + '-' + this.pad(now.getMonth() + 1) + '-' + this.pad(now.getDate())
|
|
|
this.loadAllData()
|
|
|
},
|
|
|
- formatDateKey: function(dateVal) {
|
|
|
- if (!dateVal) return ''
|
|
|
- var d = parseDate(dateVal)
|
|
|
- if (!d) return ''
|
|
|
- return d.getFullYear() + '-' + this.pad(d.getMonth() + 1) + '-' + this.pad(d.getDate())
|
|
|
- },
|
|
|
- formatRecordDate: function(dateVal) {
|
|
|
- if (!dateVal) return ''
|
|
|
- var d = parseDate(dateVal)
|
|
|
- if (!d) return ''
|
|
|
- return this.pad(d.getMonth() + 1) + '-' + this.pad(d.getDate())
|
|
|
- },
|
|
|
/** 按日期分组(变更B):把打卡/档案记录流按业务日期 recordDate>startTime>sleepTime>checkinDate>createdAt
|
|
|
* 分组合并——同日合并、分组键 yyyy-MM-dd、多日倒序(新在前)、无有效日期的记录平稳跳过 */
|
|
|
groupByDate: function(records) {
|
|
|
@@ -432,7 +329,8 @@ export default {
|
|
|
}
|
|
|
return ''
|
|
|
},
|
|
|
- /** 成长历史记录加载:档案列表与全部打卡记录汇成一条记录流,按日期分组存入 dateGroups */
|
|
|
+ /** 成长历史记录加载:档案列表与全部打卡记录汇成一条记录流,按日期分组存入 dateGroups。
|
|
|
+ * 极致简单:本页只取预览(最多 3 个日期分组 × 每组 3 条),完整记录走 /pages/growth/history */
|
|
|
async loadGrowthHistoryGroups() {
|
|
|
var self = this
|
|
|
var streams = []
|
|
|
@@ -452,20 +350,11 @@ export default {
|
|
|
var res = results[i]
|
|
|
if (res && res.code === 200 && Array.isArray(res.data)) streams = streams.concat(res.data)
|
|
|
}
|
|
|
- self.dateGroups = self.groupByDate(streams)
|
|
|
- },
|
|
|
- mealTypeLabel: function(type) {
|
|
|
- var m = { breakfast: '早餐', lunch: '午餐', dinner: '晚餐', snack: '加餐', extra: '零食' }
|
|
|
- if (!type) return '饮食'
|
|
|
- // 兼容逗号拼接多餐次(breakfast,lunch → 早餐、午餐);未知值原样输出
|
|
|
- var parts = String(type).split(',')
|
|
|
- var labels = []
|
|
|
- for (var i = 0; i < parts.length; i++) {
|
|
|
- var v = parts[i] && parts[i].trim()
|
|
|
- if (!v) continue
|
|
|
- labels.push(m[v] || v)
|
|
|
- }
|
|
|
- return labels.length > 0 ? labels.join('、') : '饮食'
|
|
|
+ var groups = self.groupByDate(streams)
|
|
|
+ // 预览上限:最多 3 个日期分组,每组最多 3 条(完整记录走历史页)
|
|
|
+ self.dateGroups = groups.slice(0, 3).map(function(g) {
|
|
|
+ return { date: g.date, records: g.records.slice(0, 3) }
|
|
|
+ })
|
|
|
},
|
|
|
async loadAllData() {
|
|
|
var self = this
|
|
|
@@ -563,7 +452,8 @@ export default {
|
|
|
async loadGrowthRecommendations() {
|
|
|
var self = this
|
|
|
try {
|
|
|
- var res = await getGrowthRecommendations('health', 6)
|
|
|
+ // 极致简单:本页仅预览 2 条,按需取 2 条即可
|
|
|
+ var res = await getGrowthRecommendations('health', 2)
|
|
|
if (res && res.code === 200 && res.data) {
|
|
|
var arts = res.data.articles || []
|
|
|
self.healthArticles = arts.filter(function(a){ return a.growthCategory === 'health' })
|
|
|
@@ -571,14 +461,13 @@ export default {
|
|
|
}
|
|
|
} catch(e) {}
|
|
|
},
|
|
|
+ /** 成长里程碑:仅保留进度类指标 = 连续打卡天数(进行中挑战/档案完整度归首页与我的页,本页不重复) */
|
|
|
async loadMilestones() {
|
|
|
var self = this
|
|
|
try {
|
|
|
var ciRes = await healthCheckinList({})
|
|
|
if (ciRes.code === 200 && ciRes.data) self.streakDays = Math.min(ciRes.data.length, 30)
|
|
|
} catch(e) {}
|
|
|
- self.activeChallenges = 0
|
|
|
- self.completeness = self.streakDays > 0 ? Math.min(100, Math.round(self.streakDays * 10)) : 0
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -586,10 +475,7 @@ export default {
|
|
|
<style scoped lang="scss">
|
|
|
// ===== 成长记录页专属色阶 =====
|
|
|
$c-growth-hero-from: $brand-primary;
|
|
|
-$c-growth-hero-to: $brand-primary-dark;
|
|
|
$c-growth-hero-bg: $uni-primary-pale;
|
|
|
-$c-growth-streak: $brand-primary;
|
|
|
-$c-danger-soft: $status-danger-soft;
|
|
|
$c-danger-ink: $status-danger-deep;
|
|
|
|
|
|
.container {
|
|
|
@@ -602,18 +488,6 @@ $c-danger-ink: $status-danger-deep;
|
|
|
// ==================== 游客态(设计稿 page-growth 落地 · 令牌化) ====================
|
|
|
// 页面级局部色令牌:仅声明 uni.scss 未收录、本页专属的值;其余全部走共享令牌
|
|
|
$gg-tint-soft: $tint-warm-soft; // 暖白浅底 #FFF1E6
|
|
|
-$gg-wisdom-border: #E4E4F5; // 智维度徽章描边
|
|
|
-$gg-dot-dim: $facade-text-ghost-light; // 分隔点
|
|
|
-
|
|
|
-// data-URI SVG icon 构造(mp-weixin 模板内禁写 <svg>,与 login-sheet 落地同款方案)
|
|
|
-@function gg-icon($color, $inner) {
|
|
|
- @return url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23#{$color}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E#{$inner}%3C/svg%3E");
|
|
|
-}
|
|
|
-$gg-ic-body-bg: str-slice('#{$dim-body-deep}', 2);
|
|
|
-$gg-ic-wisdom-bg: str-slice('#{$dim-wisdom-deep}', 2);
|
|
|
-$gg-ic-wealth-bg: str-slice('#{$dim-wealth-deep}', 2);
|
|
|
-$gg-ic-action-bg: str-slice('#{$dim-action-deep}', 2);
|
|
|
-$gg-chev-bg: str-slice('#{$facade-text-slate}', 2);
|
|
|
|
|
|
.gg-page { background: $app-bg; min-height: 100vh; padding: 28rpx 0 40rpx; }
|
|
|
|
|
|
@@ -659,41 +533,6 @@ $gg-chev-bg: str-slice('#{$facade-text-slate}', 2);
|
|
|
.gg-tag-row { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; }
|
|
|
.gg-tag-note { font-size: calc(20rpx * var(--font-scale, 1)); color: $facade-text-muted; }
|
|
|
|
|
|
-/* 功能预览行(卡片化 list) */
|
|
|
-.gg-rows { margin-top: 8rpx; display: flex; flex-direction: column; }
|
|
|
-.gg-row { display: flex; flex-direction: row; align-items: center; padding: 20rpx 12rpx; border: 1rpx solid $app-border-subtle; border-radius: 20rpx; background: $app-surface; }
|
|
|
-.gg-row + .gg-row { margin-top: 12rpx; }
|
|
|
-.gg-row:active { opacity: 0.88; }
|
|
|
-.gg-ic { width: 68rpx; height: 68rpx; border-radius: 18rpx; display: flex; flex-direction: row; align-items: center; justify-content: center; flex-shrink: 0; }
|
|
|
-.gg-ic-body {
|
|
|
- background-color: $dim-body-tint;
|
|
|
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
|
|
|
- background-image: gg-icon($gg-ic-body-bg, '%3Cpath d=%22M22 11.08V12a10 10 0 1 1-5.93-9.14%22/%3E%3Cpolyline points=%2222 4 12 14.01 9 11.01%22/%3E');
|
|
|
-}
|
|
|
-.gg-ic-wisdom {
|
|
|
- background-color: $dim-wisdom-tint;
|
|
|
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
|
|
|
- background-image: gg-icon($gg-ic-wisdom-bg, '%3Cpath d=%22M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z%22/%3E%3Cline x1=%224%22 y1=%2222%22 x2=%224%22 y2=%2215%22/%3E');
|
|
|
-}
|
|
|
-.gg-ic-wealth {
|
|
|
- background-color: $dim-wealth-tint;
|
|
|
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
|
|
|
- background-image: gg-icon($gg-ic-wealth-bg, '%3Ccircle cx=%2212%22 cy=%2212%22 r=%2210%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%226%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%222%22/%3E');
|
|
|
-}
|
|
|
-.gg-ic-action {
|
|
|
- background-color: $dim-action-tint;
|
|
|
- background-repeat: no-repeat; background-position: center; background-size: 38rpx 38rpx;
|
|
|
- background-image: gg-icon($gg-ic-action-bg, '%3Cpath d=%22M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z%22/%3E%3Cpolyline points=%2214 2 14 8 20 8%22/%3E%3Cline x1=%2216%22 y1=%2213%22 x2=%228%22 y2=%2213%22/%3E%3Cline x1=%2216%22 y1=%2217%22 x2=%228%22 y2=%2217%22/%3E');
|
|
|
-}
|
|
|
-.gg-row-info { flex: 1; min-width: 0; margin-left: 20rpx; display: flex; flex-direction: column; }
|
|
|
-.gg-row-name { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 600; color: $facade-text-strong; }
|
|
|
-.gg-row-sub { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-body; margin-top: 6rpx; }
|
|
|
-.gg-row-chev {
|
|
|
- width: 32rpx; height: 32rpx; flex-shrink: 0;
|
|
|
- background-repeat: no-repeat; background-position: center; background-size: 32rpx 32rpx;
|
|
|
- background-image: gg-icon($gg-chev-bg, '%3Cpolyline points=%229 18 15 12 9 6%22/%3E');
|
|
|
-}
|
|
|
-
|
|
|
/* 五维行动速览 */
|
|
|
.gg-acts { margin-top: 8rpx; display: flex; flex-direction: column; }
|
|
|
.gg-act { display: flex; flex-direction: row; align-items: center; padding: 20rpx 6rpx; border-top: 1rpx solid $app-border-subtle; }
|
|
|
@@ -731,59 +570,33 @@ $gg-chev-bg: str-slice('#{$facade-text-slate}', 2);
|
|
|
.reminder-text { font-size: calc(24rpx * var(--font-scale, 1)); color: $c-danger-ink; font-weight: 500; }
|
|
|
.reminder-close { font-size: calc(28rpx * var(--font-scale, 1)); color: $facade-text-muted; }
|
|
|
|
|
|
-// ---- 里程碑 ----
|
|
|
+// ---- 成长里程碑(去重:仅保留进度类 = 连续打卡,一行呈现) ----
|
|
|
.milestone-section { margin-top: 20rpx; }
|
|
|
-.milestone-card {
|
|
|
- background: $app-surface;
|
|
|
- border-radius: 24rpx;
|
|
|
- padding: 28rpx;
|
|
|
- box-shadow: 0 4rpx 24rpx rgba(0,0,0,0.06);
|
|
|
-}
|
|
|
-.milestone-header {
|
|
|
+.milestone-strip {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- margin-bottom: 20rpx;
|
|
|
-}
|
|
|
-.milestone-title {
|
|
|
- font-size: calc(28rpx * var(--font-scale, 1));
|
|
|
- font-weight: 700;
|
|
|
- color: $facade-text-strong;
|
|
|
-}
|
|
|
-.milestone-sub {
|
|
|
- font-size: calc(22rpx * var(--font-scale, 1));
|
|
|
- color: $facade-text-muted;
|
|
|
-}
|
|
|
-.milestone-grid {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- gap: 16rpx;
|
|
|
-}
|
|
|
-.milestone-tile {
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- padding: 20rpx 8rpx;
|
|
|
+ padding: 20rpx 24rpx;
|
|
|
border-radius: 24rpx;
|
|
|
background: $facade-brand-tint;
|
|
|
- border: 1rpx solid rgba($c-growth-hero-from, 0.1);
|
|
|
+ border: 1rpx solid rgba($c-growth-hero-from, 0.16);
|
|
|
}
|
|
|
-.milestone-tile-icon {
|
|
|
- font-size: calc(40rpx * var(--font-scale, 1));
|
|
|
- display: block;
|
|
|
- margin-bottom: 6rpx;
|
|
|
-}
|
|
|
-.milestone-tile-value {
|
|
|
+.milestone-strip-ic {
|
|
|
font-size: calc(32rpx * var(--font-scale, 1));
|
|
|
+ flex-shrink: 0;
|
|
|
+}
|
|
|
+.milestone-strip-label {
|
|
|
+ font-size: calc(24rpx * var(--font-scale, 1));
|
|
|
+ font-weight: 600;
|
|
|
+ color: $facade-text-body;
|
|
|
+ margin-left: 16rpx;
|
|
|
+}
|
|
|
+.milestone-strip-value {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ text-align: right;
|
|
|
+ font-size: calc(26rpx * var(--font-scale, 1));
|
|
|
font-weight: 700;
|
|
|
color: $c-growth-hero-from;
|
|
|
- line-height: 1;
|
|
|
- margin-bottom: 4rpx;
|
|
|
-}
|
|
|
-.milestone-tile-label {
|
|
|
- font-size: calc(20rpx * var(--font-scale, 1));
|
|
|
- color: $facade-text-muted;
|
|
|
}
|
|
|
|
|
|
// ---- 今日成长 ----
|
|
|
@@ -884,60 +697,39 @@ $gg-chev-bg: str-slice('#{$facade-text-slate}', 2);
|
|
|
background: $brand-primary;
|
|
|
color: $uni-surface;
|
|
|
}
|
|
|
-.streak-footer {
|
|
|
- margin-top: 18rpx;
|
|
|
- padding-top: 16rpx;
|
|
|
- border-top: 1rpx solid $facade-fill-2;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
-}
|
|
|
-.streak-badge {
|
|
|
- font-size: calc(24rpx * var(--font-scale, 1));
|
|
|
- font-weight: 600;
|
|
|
- color: $c-growth-streak;
|
|
|
- background: $facade-brand-tint;
|
|
|
- padding: 8rpx 24rpx;
|
|
|
- border-radius: 999rpx;
|
|
|
-}
|
|
|
|
|
|
-// ---- 通用操作卡片 ----
|
|
|
-.action-card {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- padding: 24rpx 24rpx;
|
|
|
+// ---- 二级入口(饮食推荐 / 益智小游戏 · 各一行) ----
|
|
|
+.quick-entries {
|
|
|
background: $app-surface;
|
|
|
border-radius: 24rpx;
|
|
|
- margin-bottom: 12rpx;
|
|
|
+ padding: 8rpx 24rpx;
|
|
|
box-shadow: 0 2rpx 16rpx rgba(0,0,0,0.05);
|
|
|
}
|
|
|
-.action-card:active { opacity: 0.88; transform: scale(0.985); }
|
|
|
-.action-icon-wrap {
|
|
|
- width: 72rpx;
|
|
|
- height: 72rpx;
|
|
|
- border-radius: 24rpx;
|
|
|
+.quick-entry {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
- margin-right: 18rpx;
|
|
|
+ padding: 22rpx 0;
|
|
|
+}
|
|
|
+.quick-entry + .quick-entry { border-top: 1rpx solid $app-border-subtle; }
|
|
|
+.quick-entry:active { opacity: 0.85; }
|
|
|
+.quick-entry-ic {
|
|
|
+ font-size: calc(32rpx * var(--font-scale, 1));
|
|
|
flex-shrink: 0;
|
|
|
+ margin-right: 16rpx;
|
|
|
}
|
|
|
-.action-icon-wrap.danger { background: $c-danger-soft; }
|
|
|
-.action-icon-wrap.warm { background: $dim-body-tint; }
|
|
|
-.action-icon { font-size: calc(36rpx * var(--font-scale, 1)); }
|
|
|
-.action-info { flex: 1; min-width: 0; }
|
|
|
-.action-title {
|
|
|
+.quick-entry-name {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
font-size: calc(28rpx * var(--font-scale, 1));
|
|
|
font-weight: 600;
|
|
|
color: $facade-text-strong;
|
|
|
- display: block;
|
|
|
}
|
|
|
-.action-desc {
|
|
|
- font-size: calc(22rpx * var(--font-scale, 1));
|
|
|
- color: $facade-text-muted;
|
|
|
- margin-top: 4rpx;
|
|
|
- display: block;
|
|
|
+.quick-entry-chev {
|
|
|
+ font-size: calc(32rpx * var(--font-scale, 1));
|
|
|
+ color: $facade-text-ghost;
|
|
|
+ flex-shrink: 0;
|
|
|
+ margin-left: 12rpx;
|
|
|
}
|
|
|
-.action-arrow { font-size: calc(32rpx * var(--font-scale, 1)); color: $facade-text-ghost; flex-shrink: 0; margin-left: 12rpx; }
|
|
|
|
|
|
// ---- 通用 section-header ----
|
|
|
.section-header {
|