|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="container" :style="{ '--font-scale': fontScale }">
|
|
<view class="container" :style="{ '--font-scale': fontScale }">
|
|
|
- <!-- 通用登录浮层 -->
|
|
|
|
|
- <login-sheet ref="loginSheet" @success="onSheetLoginSuccess" @open="onLoginSheetOpen" @close="onLoginSheetClose" />
|
|
|
|
|
|
|
+ <!-- 通用登录浮层(@open/@close 已随访客示例雷达移除一并删除) -->
|
|
|
|
|
+ <login-sheet ref="loginSheet" @success="onSheetLoginSuccess" />
|
|
|
<block v-if="!isLoggedIn">
|
|
<block v-if="!isLoggedIn">
|
|
|
<view class="gh-page">
|
|
<view class="gh-page">
|
|
|
<!-- 页面头 / 品牌锚点 -->
|
|
<!-- 页面头 / 品牌锚点 -->
|
|
@@ -44,67 +44,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- 演示雷达(登录浮层打开时隐藏:原生 canvas 会盖在浮层之上) -->
|
|
|
|
|
- <!-- 统一维度体系:示例雷达按注册中心配置取数(维度清单来自 useDimensionRegistry),无配置显示空态引导 -->
|
|
|
|
|
- <view class="gh-demo" v-if="!loginSheetVisible">
|
|
|
|
|
- <view v-if="guestBodyDims.length > 0" class="gh-demo-block">
|
|
|
|
|
- <view class="gh-demo-head">
|
|
|
|
|
- <text class="gh-demo-name">身体雷达</text>
|
|
|
|
|
- <text class="gh-demo-tag">示例</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <RadarChart :dimensions="guestBodyDims" :scores="guestBodyScores" :fillColor="bodyColor" childName="示例" width="560" height="460" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-if="guestCogDims.length > 0" class="gh-demo-block">
|
|
|
|
|
- <view class="gh-demo-head">
|
|
|
|
|
- <text class="gh-demo-name">认知雷达</text>
|
|
|
|
|
- <text class="gh-demo-tag">示例</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <RadarChart :dimensions="guestCogDims" :scores="guestCogScores" :fillColor="wisdomColor" childName="示例" width="560" height="460" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-if="!guestHasDemoConfig" class="gh-demo-empty">
|
|
|
|
|
- <text class="gh-demo-empty-text">健康雷达尚未配置</text>
|
|
|
|
|
- <text class="gh-demo-empty-sub">完成维度配置后即可查看示例效果</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 五维健康体系(完整版:全站唯一保留相生相克的一页) -->
|
|
|
|
|
|
|
+ <!-- 五维速览(删营销长文:相生相克长文 + 双雷达示例,改为紧凑 5 行维度入口) -->
|
|
|
<view class="gh-wuxing">
|
|
<view class="gh-wuxing">
|
|
|
<text class="gh-wuxing-title">身 · 智 · 富 · 行 · 心,看得见的健康闭环</text>
|
|
<text class="gh-wuxing-title">身 · 智 · 富 · 行 · 心,看得见的健康闭环</text>
|
|
|
- <text class="gh-wuxing-sub">五行相生相克,从报告和测评里,真正读懂家人的身体。</text>
|
|
|
|
|
-
|
|
|
|
|
- <view class="gh-rel">
|
|
|
|
|
- <text class="gh-rel-title">相生 · 前进</text>
|
|
|
|
|
- <view class="gh-chain">
|
|
|
|
|
- <text class="gh-node gh-node-body">身</text>
|
|
|
|
|
- <view class="gh-arrow"></view>
|
|
|
|
|
- <text class="gh-node gh-node-wisdom">智</text>
|
|
|
|
|
- <view class="gh-arrow"></view>
|
|
|
|
|
- <text class="gh-node gh-node-wealth">富</text>
|
|
|
|
|
- <view class="gh-arrow"></view>
|
|
|
|
|
- <text class="gh-node gh-node-action">行</text>
|
|
|
|
|
- <view class="gh-arrow"></view>
|
|
|
|
|
- <text class="gh-node gh-node-mind">心</text>
|
|
|
|
|
- <view class="gh-arrow"></view>
|
|
|
|
|
- <text class="gh-node gh-node-body">身</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <text class="gh-rel-hint">健康孕育智慧,智慧创造价值,价值滋养关系,关系反哺心灵,心灵守护健康。</text>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="gh-rel">
|
|
|
|
|
- <text class="gh-rel-title">相克 · 平衡</text>
|
|
|
|
|
- <view class="gh-chain">
|
|
|
|
|
- <text class="gh-node gh-node-body">身克富</text>
|
|
|
|
|
- <text class="gh-sep">·</text>
|
|
|
|
|
- <text class="gh-node gh-node-wisdom">智克行</text>
|
|
|
|
|
- <text class="gh-sep">·</text>
|
|
|
|
|
- <text class="gh-node gh-node-wealth">富克心</text>
|
|
|
|
|
- <text class="gh-sep">·</text>
|
|
|
|
|
- <text class="gh-node gh-node-action">行克身</text>
|
|
|
|
|
- <text class="gh-sep">·</text>
|
|
|
|
|
- <text class="gh-node gh-node-mind">心克智</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <text class="gh-rel-hint">莫以健康换金钱,真诚胜过算计,财富服务家庭,关爱有度、大爱留白。</text>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <text class="gh-wuxing-sub">点开一个维度,从报告和测评里读懂家人。</text>
|
|
|
|
|
|
|
|
<view class="gh-rows">
|
|
<view class="gh-rows">
|
|
|
<view class="gh-row gh-row--featured" @click="goPage('/pages/body-detail/index')">
|
|
<view class="gh-row gh-row--featured" @click="goPage('/pages/body-detail/index')">
|
|
@@ -173,7 +116,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="section section-chart">
|
|
<view class="section section-chart">
|
|
|
- <RadarChart :dimensions="currentDimensions" :scores="currentScores || []" :fillColor="currentColor" :childName="selectedMemberName" :avgScores="currentAvgScores || []" width="640" height="520" />
|
|
|
|
|
|
|
+ <!-- 雷达高度压缩(520→400),让主行动(上传报告/测评)进入首屏 -->
|
|
|
|
|
+ <RadarChart :dimensions="currentDimensions" :scores="currentScores || []" :fillColor="currentColor" :childName="selectedMemberName" :avgScores="currentAvgScores || []" width="640" height="400" />
|
|
|
<view class="chart-empty" v-if="chartIsEmpty">
|
|
<view class="chart-empty" v-if="chartIsEmpty">
|
|
|
<text class="empty-text">{{ currentTabLabel }}数据待采集</text>
|
|
<text class="empty-text">{{ currentTabLabel }}数据待采集</text>
|
|
|
<text class="empty-sub">完成测评或上传报告即可解锁{{ currentTabLabel }}数据</text>
|
|
<text class="empty-sub">完成测评或上传报告即可解锁{{ currentTabLabel }}数据</text>
|
|
@@ -187,13 +131,24 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
+ <!-- 数据中心(极致简单:主行动 = 上传报告 + 测评,置顶承载) -->
|
|
|
<view class="section section-data-collect">
|
|
<view class="section section-data-collect">
|
|
|
- <ReportUploadCard
|
|
|
|
|
- title="上传报告"
|
|
|
|
|
- desc="体检报告 · 菌群检测 · 认知测评 · 心理测评 · 情绪打卡"
|
|
|
|
|
- :tags="['体检报告', '菌群检测', '认知测评', '心理测评', '情绪打卡']"
|
|
|
|
|
- @click="goPage('/pages/health/report-upload')" />
|
|
|
|
|
|
|
+ <!-- 主行动大入口:上传报告(品牌紫 hero + BasePrimaryButton) -->
|
|
|
|
|
+ <view class="upload-hero" @click="goReportUpload">
|
|
|
|
|
+ <view class="upload-hero-row">
|
|
|
|
|
+ <view class="upload-hero-ic">
|
|
|
|
|
+ <view class="upload-hero-ic-svg"></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="upload-hero-info">
|
|
|
|
|
+ <text class="upload-hero-title">上传健康报告</text>
|
|
|
|
|
+ <text class="upload-hero-desc">体检 · 菌群 · 认知 · 心理 · 情绪打卡</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="upload-hero-chev"></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <BasePrimaryButton size="lg" block class="upload-hero-btn" @click.stop="goReportUpload">立即上传</BasePrimaryButton>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
+ <!-- 在线测评(3 项) -->
|
|
|
<view class="data-card data-card-assessment">
|
|
<view class="data-card data-card-assessment">
|
|
|
<view class="data-card-head">
|
|
<view class="data-card-head">
|
|
|
<text class="data-card-title">在线测评</text>
|
|
<text class="data-card-title">在线测评</text>
|
|
@@ -212,7 +167,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- 健康阅卷入口(HL-01):问卷式记录,多次填写以最后一次为准 -->
|
|
|
|
|
|
|
+ <!-- 健康阅卷(登录态唯一健康问卷入口,与访客态 15 题自检合并语义) -->
|
|
|
<view class="data-card" @click="goHealthReview">
|
|
<view class="data-card" @click="goHealthReview">
|
|
|
<view class="data-card-icon">📝</view>
|
|
<view class="data-card-icon">📝</view>
|
|
|
<view class="data-card-info">
|
|
<view class="data-card-info">
|
|
@@ -222,19 +177,25 @@
|
|
|
<text class="data-card-arrow">›</text>
|
|
<text class="data-card-arrow">›</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- 运动手环 · 华为健康(H2 契约 §4):未绑定 → 绑定入口;已绑定 → 摘要 + mock 角标 + 同步/撤销 -->
|
|
|
|
|
- <view class="data-card">
|
|
|
|
|
|
|
+ <!-- 数据来源(华为健康折叠为二级入口,不占首屏) -->
|
|
|
|
|
+ <view class="data-card" @click="toggleDataSource">
|
|
|
<view class="data-card-icon">⌚</view>
|
|
<view class="data-card-icon">⌚</view>
|
|
|
<view class="data-card-info">
|
|
<view class="data-card-info">
|
|
|
- <text class="data-card-title">运动手环 · 华为健康<text v-if="huaweiMock" class="data-card-badge">mock</text></text>
|
|
|
|
|
- <text class="data-card-desc">{{ huaweiDescText }}</text>
|
|
|
|
|
|
|
+ <text class="data-card-title">数据来源<text v-if="huaweiMock" class="data-card-badge">mock</text></text>
|
|
|
|
|
+ <text class="data-card-desc">{{ huaweiSourceText }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view v-if="huaweiBound && !huaweiSyncing" class="data-card-actions">
|
|
|
|
|
- <button class="data-card-btn" @click.stop="syncHuawei">同步</button>
|
|
|
|
|
- <button class="data-card-btn data-card-btn--ghost" @click.stop="revokeHuawei">撤销</button>
|
|
|
|
|
|
|
+ <text class="data-card-arrow">{{ dataSourceOpen ? '⌄' : '›' }}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="data-source-panel" v-if="dataSourceOpen">
|
|
|
|
|
+ <text class="data-source-desc">{{ huaweiDescText }}</text>
|
|
|
|
|
+ <view class="data-source-actions">
|
|
|
|
|
+ <view v-if="huaweiBound && !huaweiSyncing" class="data-source-btns">
|
|
|
|
|
+ <button class="data-card-btn" @click.stop="syncHuawei">同步</button>
|
|
|
|
|
+ <button class="data-card-btn data-card-btn--ghost" @click.stop="revokeHuawei">撤销</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <button v-else-if="!huaweiBound" class="data-card-btn" @click.stop="bindHuawei">绑定</button>
|
|
|
|
|
+ <text v-else class="data-source-syncing">同步中…</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <button v-else-if="!huaweiBound" class="data-card-btn" @click.stop="bindHuawei">绑定</button>
|
|
|
|
|
- <text v-else class="data-card-syncing">同步中…</text>
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -244,7 +205,7 @@
|
|
|
<text class="section-more" @click="goPage('/pages/health/report-list')">查看全部 ›</text>
|
|
<text class="section-more" @click="goPage('/pages/health/report-list')">查看全部 ›</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="reports.length > 0">
|
|
<view v-if="reports.length > 0">
|
|
|
- <view class="report-card" v-for="(report, idx) in reports.slice(0, 3)" :key="idx" @click="goReportDetail(report)">
|
|
|
|
|
|
|
+ <view class="report-card" v-for="(report, idx) in reports.slice(0, 2)" :key="idx" @click="goReportDetail(report)">
|
|
|
<view class="report-type-badge" :class="'badge-' + _reportTypeClass(report.reportType)">{{ _reportTypeLabel(report.reportType) }}</view>
|
|
<view class="report-type-badge" :class="'badge-' + _reportTypeClass(report.reportType)">{{ _reportTypeLabel(report.reportType) }}</view>
|
|
|
<view class="report-info">
|
|
<view class="report-info">
|
|
|
<text class="report-name">{{ report.childName || report.personName || '健康报告' }}</text>
|
|
<text class="report-name">{{ report.childName || report.personName || '健康报告' }}</text>
|
|
@@ -291,7 +252,7 @@ import { BrandColors } from '../../utils/brand-colors.js'
|
|
|
import LoginGuideCard from '../../components/LoginGuideCard.vue'
|
|
import LoginGuideCard from '../../components/LoginGuideCard.vue'
|
|
|
import RadarChart from '../../components/RadarChart.vue'
|
|
import RadarChart from '../../components/RadarChart.vue'
|
|
|
import ArticleFeed from '../../components/ArticleFeed.vue'
|
|
import ArticleFeed from '../../components/ArticleFeed.vue'
|
|
|
-import ReportUploadCard from '../../components/report-upload-card.vue'
|
|
|
|
|
|
|
+import BasePrimaryButton from '../../components/BasePrimaryButton.vue'
|
|
|
import { parseDate } from '../../utils/format.js'
|
|
import { parseDate } from '../../utils/format.js'
|
|
|
import { ensureDimensionRegistry, getRadarConfig, isRegistryReady, WEALTH_CHILD_LABEL } from '../../composables/useDimensionRegistry.js'
|
|
import { ensureDimensionRegistry, getRadarConfig, isRegistryReady, WEALTH_CHILD_LABEL } from '../../composables/useDimensionRegistry.js'
|
|
|
import fontScaleMixin from '@/mixins/font-scale.js'
|
|
import fontScaleMixin from '@/mixins/font-scale.js'
|
|
@@ -299,11 +260,9 @@ import shareMixin from '../../components/share-mixin.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [fontScaleMixin, shareMixin],
|
|
mixins: [fontScaleMixin, shareMixin],
|
|
|
- components: { LoginGuideCard, RadarChart, ArticleFeed, ReportUploadCard },
|
|
|
|
|
|
|
+ components: { LoginGuideCard, RadarChart, ArticleFeed, BasePrimaryButton },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- bodyColor: BrandColors.body,
|
|
|
|
|
- wisdomColor: BrandColors.wisdom,
|
|
|
|
|
isLoggedIn: !!uni.getStorageSync('token'),
|
|
isLoggedIn: !!uni.getStorageSync('token'),
|
|
|
currentTab: 'body',
|
|
currentTab: 'body',
|
|
|
selectedMemberName: '',
|
|
selectedMemberName: '',
|
|
@@ -337,8 +296,8 @@ export default {
|
|
|
wealthDetail: null,
|
|
wealthDetail: null,
|
|
|
childrenList: [],
|
|
childrenList: [],
|
|
|
relationshipEmpty: false,
|
|
relationshipEmpty: false,
|
|
|
- // 登录浮层打开标志(打开期间隐藏演示雷达,避免原生 canvas 盖在浮层之上)
|
|
|
|
|
- loginSheetVisible: false,
|
|
|
|
|
|
|
+ // 数据来源面板展开标志(华为健康卡折叠为二级入口,默认收起不占首屏)
|
|
|
|
|
+ dataSourceOpen: false,
|
|
|
// 统一维度注册中心是否就绪(成功取到 tree 后由 ensureDimensionRegistry 置位)
|
|
// 统一维度注册中心是否就绪(成功取到 tree 后由 ensureDimensionRegistry 置位)
|
|
|
// 未就绪时主页雷达回落硬编码兜底,保证后端未上线 / 接口异常时页面不崩
|
|
// 未就绪时主页雷达回落硬编码兜底,保证后端未上线 / 接口异常时页面不崩
|
|
|
registryReady: false,
|
|
registryReady: false,
|
|
@@ -440,21 +399,11 @@ export default {
|
|
|
var quiz = this.quizzes.filter(function(q) { return q.code === this.currentTab }.bind(this))[0]
|
|
var quiz = this.quizzes.filter(function(q) { return q.code === this.currentTab }.bind(this))[0]
|
|
|
return !(quiz && quiz.score)
|
|
return !(quiz && quiz.score)
|
|
|
},
|
|
},
|
|
|
- // ── 访客态示例雷达(统一维度体系):维度清单按注册中心配置取,无配置显示空态引导 ──
|
|
|
|
|
- guestBodyDims: function() {
|
|
|
|
|
- return this._guestRadarDims('body')
|
|
|
|
|
- },
|
|
|
|
|
- guestBodyScores: function() {
|
|
|
|
|
- return this._guestDemoScores(this.guestBodyDims)
|
|
|
|
|
- },
|
|
|
|
|
- guestCogDims: function() {
|
|
|
|
|
- return this._guestRadarDims('cognitive')
|
|
|
|
|
- },
|
|
|
|
|
- guestCogScores: function() {
|
|
|
|
|
- return this._guestDemoScores(this.guestCogDims)
|
|
|
|
|
- },
|
|
|
|
|
- guestHasDemoConfig: function() {
|
|
|
|
|
- return this.guestBodyDims.length > 0 || this.guestCogDims.length > 0
|
|
|
|
|
|
|
+ // ── 数据来源摘要文案(折叠行展示:未绑定 / 已绑定 / 同步中,不占首屏) ──
|
|
|
|
|
+ huaweiSourceText: function() {
|
|
|
|
|
+ if (this.huaweiSyncing) return '华为运动健康 · 同步中'
|
|
|
|
|
+ if (this.huaweiBound) return '华为运动健康 · 已绑定'
|
|
|
|
|
+ return '华为运动健康 · 未绑定'
|
|
|
},
|
|
},
|
|
|
// ── 运动手环 · 华为健康卡片描述文案(H4 三态:未绑定 / 已绑定 / 同步中) ──
|
|
// ── 运动手环 · 华为健康卡片描述文案(H4 三态:未绑定 / 已绑定 / 同步中) ──
|
|
|
// 未绑定态用途说明须覆盖 6 项数据(步数/距离/心率/睡眠/体重/身高),仅用于家庭健康档案展示(H4-4)
|
|
// 未绑定态用途说明须覆盖 6 项数据(步数/距离/心率/睡眠/体重/身高),仅用于家庭健康档案展示(H4-4)
|
|
@@ -487,13 +436,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
this.pendingSurveys = []
|
|
this.pendingSurveys = []
|
|
|
- // 访客态:示例雷达同样按注册中心配置渲染(无配置显示空态引导)
|
|
|
|
|
- var self = this
|
|
|
|
|
- ensureDimensionRegistry().then(function() {
|
|
|
|
|
- self.registryReady = isRegistryReady()
|
|
|
|
|
- }).catch(function() {
|
|
|
|
|
- self.registryReady = false
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // 访客态:已移除示例雷达(gh-demo),不再拉取维度注册中心
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -654,40 +597,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
return 0
|
|
return 0
|
|
|
},
|
|
},
|
|
|
- /**
|
|
|
|
|
- * 访客演示雷达维度清单:按注册中心配置取(body→body 根、cognitive→wisdom 根),
|
|
|
|
|
- * 未就绪或无配置返回空数组(模板据此渲染空态引导文案)。
|
|
|
|
|
- * @param {string} tab
|
|
|
|
|
- * @returns {Array<{label:string,key:string,code:string}>}
|
|
|
|
|
- */
|
|
|
|
|
- _guestRadarDims: function(tab) {
|
|
|
|
|
- var config = getRadarConfig(tab)
|
|
|
|
|
- if (!this.registryReady || !config || config.length === 0) return []
|
|
|
|
|
- var dims = []
|
|
|
|
|
- for (var i = 0; i < config.length; i++) {
|
|
|
|
|
- var c = config[i]
|
|
|
|
|
- dims.push({ label: c.label, key: c.code, code: c.code })
|
|
|
|
|
- }
|
|
|
|
|
- return dims
|
|
|
|
|
- },
|
|
|
|
|
- /**
|
|
|
|
|
- * 访客演示雷达示例分数:按维度数量生成确定性示例分(非字面量数组),
|
|
|
|
|
- * 仅用于示例形状演示,无真实数据含义。替代原访客示例的硬编码分数数组。
|
|
|
|
|
- * @param {Array} dims
|
|
|
|
|
- * @returns {Array<number>}
|
|
|
|
|
- */
|
|
|
|
|
- _guestDemoScores: function(dims) {
|
|
|
|
|
- var scores = []
|
|
|
|
|
- for (var i = 0; i < dims.length; i++) {
|
|
|
|
|
- scores.push(72 - (i % 3) * 4)
|
|
|
|
|
- }
|
|
|
|
|
- return scores
|
|
|
|
|
- },
|
|
|
|
|
switchTab: function(code) { this.currentTab = code },
|
|
switchTab: function(code) { this.currentTab = code },
|
|
|
goPage: function(url) { uni.navigateTo({ url: url }) },
|
|
goPage: function(url) { uni.navigateTo({ url: url }) },
|
|
|
- // 登录浮层打开/关闭(隐藏演示雷达,规避原生 canvas 层级高于浮层的问题)
|
|
|
|
|
- onLoginSheetOpen: function() { this.loginSheetVisible = true },
|
|
|
|
|
- onLoginSheetClose: function() { this.loginSheetVisible = false },
|
|
|
|
|
|
|
+ // 主行动:上传报告(品牌紫 hero + BasePrimaryButton 共用)
|
|
|
|
|
+ goReportUpload: function() { uni.navigateTo({ url: '/pages/health/report-upload' }) },
|
|
|
|
|
+ // 数据来源面板展开/收起(华为健康卡折叠为二级入口,不占首屏)
|
|
|
|
|
+ toggleDataSource: function() { this.dataSourceOpen = !this.dataSourceOpen },
|
|
|
// 登录成功:刷新登录态数据(镜像 onShow 已登录分支)
|
|
// 登录成功:刷新登录态数据(镜像 onShow 已登录分支)
|
|
|
onLoginSuccess: function() {
|
|
onLoginSuccess: function() {
|
|
|
// 未登录点击「15题五维健康自检」→ 登录成功后续接跳转调研问卷
|
|
// 未登录点击「15题五维健康自检」→ 登录成功后续接跳转调研问卷
|
|
@@ -905,9 +820,9 @@ export default {
|
|
|
var api = require('../../utils/api.js')
|
|
var api = require('../../utils/api.js')
|
|
|
var memberId = uni.getStorageSync('currentChildId') || uni.getStorageSync('currentMemberId') || uni.getStorageSync('userId') || ''
|
|
var memberId = uni.getStorageSync('currentChildId') || uni.getStorageSync('currentMemberId') || uni.getStorageSync('userId') || ''
|
|
|
// 最近记录:展示家庭所有成员的最近报告——不传 memberId,后端返回当前家庭全部报告
|
|
// 最近记录:展示家庭所有成员的最近报告——不传 memberId,后端返回当前家庭全部报告
|
|
|
- // (按报告日期倒序)取最近 3 条,卡片通过 childName/personName 区分成员。
|
|
|
|
|
|
|
+ // (按报告日期倒序)取最近 2 条(3→2 压缩预览),卡片通过 childName/personName 区分成员。
|
|
|
// 下方维度/认知/心理等数据仍按当前选中成员(memberId)加载,不受此影响
|
|
// 下方维度/认知/心理等数据仍按当前选中成员(memberId)加载,不受此影响
|
|
|
- api.getReportList('', 3).then(function(res) {
|
|
|
|
|
|
|
+ api.getReportList('', 2).then(function(res) {
|
|
|
if (res.code === 200 && res.data) {
|
|
if (res.code === 200 && res.data) {
|
|
|
var list = Array.isArray(res.data) ? res.data : (res.data.list || [])
|
|
var list = Array.isArray(res.data) ? res.data : (res.data.list || [])
|
|
|
self.reports = list
|
|
self.reports = list
|
|
@@ -920,10 +835,10 @@ export default {
|
|
|
}).catch(function() {})
|
|
}).catch(function() {})
|
|
|
}
|
|
}
|
|
|
// 文章
|
|
// 文章
|
|
|
- api.getFeaturedArticles({ size: 3, dimensionCode: 'body' }).then(function(res) {
|
|
|
|
|
|
|
+ api.getFeaturedArticles({ size: 2, dimensionCode: 'body' }).then(function(res) {
|
|
|
if (res.code === 200 && res.data) {
|
|
if (res.code === 200 && res.data) {
|
|
|
var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
|
|
var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
|
|
|
- self.healthArticles = list.slice(0, 3) || []
|
|
|
|
|
|
|
+ self.healthArticles = list.slice(0, 2) || []
|
|
|
}
|
|
}
|
|
|
}).catch(function() {})
|
|
}).catch(function() {})
|
|
|
// 认知测评得分
|
|
// 认知测评得分
|
|
@@ -1024,18 +939,33 @@ export default {
|
|
|
.dc-icon { font-size: calc(32rpx * var(--font-scale, 1)); margin-right: 8rpx; }
|
|
.dc-icon { font-size: calc(32rpx * var(--font-scale, 1)); margin-right: 8rpx; }
|
|
|
.dc-title { font-size: calc(32rpx * var(--font-scale, 1)); font-weight: bold; color: $facade-text-strong; }
|
|
.dc-title { font-size: calc(32rpx * var(--font-scale, 1)); font-weight: bold; color: $facade-text-strong; }
|
|
|
.section-data-collect { margin: 8rpx 24rpx; }
|
|
.section-data-collect { margin: 8rpx 24rpx; }
|
|
|
|
|
+/* 主行动大入口:上传报告(品牌紫 hero,一屏唯一主行动) */
|
|
|
|
|
+.upload-hero { background: linear-gradient(150deg, $brand-primary 0%, $brand-primary-dark 100%); border-radius: 24rpx; padding: 28rpx 28rpx 24rpx; margin-bottom: 16rpx; box-shadow: 0 6rpx 20rpx rgba(124, 58, 237, 0.22); }
|
|
|
|
|
+.upload-hero:active { opacity: 0.94; }
|
|
|
|
|
+.upload-hero-row { display: flex; align-items: center; }
|
|
|
|
|
+.upload-hero-ic { width: 88rpx; height: 88rpx; flex-shrink: 0; border-radius: 24rpx; background: rgba($app-surface, 0.18); display: flex; align-items: center; justify-content: center; }
|
|
|
|
|
+.upload-hero-ic-svg { width: 44rpx; height: 44rpx; background-color: transparent; background-repeat: no-repeat; background-position: center; background-size: 44rpx 44rpx; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='12' y1='18' x2='12' y2='12'/%3E%3Cpolyline points='9 15 12 12 15 15'/%3E%3C/svg%3E"); }
|
|
|
|
|
+.upload-hero-info { flex: 1; min-width: 0; margin-left: 24rpx; display: flex; flex-direction: column; }
|
|
|
|
|
+.upload-hero-title { font-size: calc(32rpx * var(--font-scale, 1)); font-weight: 800; color: $app-surface; letter-spacing: 1rpx; }
|
|
|
|
|
+.upload-hero-desc { font-size: calc(23rpx * var(--font-scale, 1)); color: rgba($app-surface, 0.88); margin-top: 6rpx; }
|
|
|
|
|
+.upload-hero-chev { width: 36rpx; height: 36rpx; flex-shrink: 0; margin-left: 12rpx; background-repeat: no-repeat; background-position: center; background-size: 36rpx 36rpx; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E"); }
|
|
|
|
|
+.upload-hero-btn { margin-top: 22rpx; background: $app-surface; color: $brand-primary; }
|
|
|
|
|
+/* 数据来源(华为健康)折叠二级面板 */
|
|
|
|
|
+.data-source-panel { background: $app-surface; border: 1rpx solid $app-border-subtle; border-radius: 24rpx; padding: 24rpx; margin: -4rpx 0 12rpx; }
|
|
|
|
|
+.data-source-desc { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.6; display: block; }
|
|
|
|
|
+.data-source-actions { margin-top: 16rpx; }
|
|
|
|
|
+.data-source-btns { display: flex; align-items: center; }
|
|
|
|
|
+.data-source-syncing { font-size: calc(24rpx * var(--font-scale, 1)); color: $brand-primary; }
|
|
|
.data-card { display: flex; align-items: center; background: $app-surface; border-radius: 24rpx; padding: 24rpx; margin-bottom: 12rpx; box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06); }
|
|
.data-card { display: flex; align-items: center; background: $app-surface; border-radius: 24rpx; padding: 24rpx; margin-bottom: 12rpx; box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06); }
|
|
|
.data-card-icon { width: 88rpx; height: 88rpx; border-radius: 24rpx; display: flex; align-items: center; justify-content: center; margin-right: 20rpx; font-size: calc(40rpx * var(--font-scale, 1)); }
|
|
.data-card-icon { width: 88rpx; height: 88rpx; border-radius: 24rpx; display: flex; align-items: center; justify-content: center; margin-right: 20rpx; font-size: calc(40rpx * var(--font-scale, 1)); }
|
|
|
.data-card-info { flex: 1; }
|
|
.data-card-info { flex: 1; }
|
|
|
.data-card-title { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: bold; color: $facade-text-strong; display: block; margin-bottom: 6rpx; }
|
|
.data-card-title { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: bold; color: $facade-text-strong; display: block; margin-bottom: 6rpx; }
|
|
|
.data-card-desc { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-muted; }
|
|
.data-card-desc { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-muted; }
|
|
|
.data-card-arrow { font-size: calc(36rpx * var(--font-scale, 1)); color: $facade-text-ghost; }
|
|
.data-card-arrow { font-size: calc(36rpx * var(--font-scale, 1)); color: $facade-text-ghost; }
|
|
|
-/* 运动手环 · 华为健康(H2)卡片扩展 */
|
|
|
|
|
-.data-card-actions { display: flex; align-items: center; }
|
|
|
|
|
|
|
+/* 运动手环 · 华为健康(H2)卡片扩展:按钮样式供折叠面板复用 */
|
|
|
.data-card-btn { flex-shrink: 0; margin-left: 16rpx; padding: 0 24rpx; height: 56rpx; line-height: 56rpx; border-radius: 28rpx; font-size: calc(24rpx * var(--font-scale, 1)); background: $brand-primary; color: $app-surface; border: none; }
|
|
.data-card-btn { flex-shrink: 0; margin-left: 16rpx; padding: 0 24rpx; height: 56rpx; line-height: 56rpx; border-radius: 28rpx; font-size: calc(24rpx * var(--font-scale, 1)); background: $brand-primary; color: $app-surface; border: none; }
|
|
|
.data-card-btn--ghost { background: transparent; color: $brand-primary; border: 1rpx solid $brand-primary; }
|
|
.data-card-btn--ghost { background: transparent; color: $brand-primary; border: 1rpx solid $brand-primary; }
|
|
|
.data-card-badge { display: inline-block; margin-left: 8rpx; padding: 0 12rpx; border-radius: 16rpx; font-size: calc(18rpx * var(--font-scale, 1)); font-weight: normal; color: #b26a00; background: #fff3d6; vertical-align: middle; }
|
|
.data-card-badge { display: inline-block; margin-left: 8rpx; padding: 0 12rpx; border-radius: 16rpx; font-size: calc(18rpx * var(--font-scale, 1)); font-weight: normal; color: #b26a00; background: #fff3d6; vertical-align: middle; }
|
|
|
-.data-card-syncing { flex-shrink: 0; margin-left: 16rpx; padding: 0 20rpx; height: 56rpx; line-height: 56rpx; border-radius: 28rpx; font-size: calc(24rpx * var(--font-scale, 1)); color: $brand-primary; background: rgba(64, 116, 230, 0.08); }
|
|
|
|
|
.data-card-assessment { flex-direction: column; align-items: stretch; padding: 24rpx; }
|
|
.data-card-assessment { flex-direction: column; align-items: stretch; padding: 24rpx; }
|
|
|
.data-card-head { display: flex; align-items: center; margin-bottom: 16rpx; }
|
|
.data-card-head { display: flex; align-items: center; margin-bottom: 16rpx; }
|
|
|
.data-card-subtitle { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-muted; margin-left: 12rpx; }
|
|
.data-card-subtitle { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-muted; margin-left: 12rpx; }
|
|
@@ -1090,8 +1020,6 @@ $gh-cta-press-from: #A9330A;
|
|
|
$gh-cta-press-to: #962D08;
|
|
$gh-cta-press-to: #962D08;
|
|
|
$gh-white-16: rgba($app-surface, 0.16); // 橙底图标盘
|
|
$gh-white-16: rgba($app-surface, 0.16); // 橙底图标盘
|
|
|
$gh-tint-soft: $tint-warm-soft; // 暖白浅底 #FFF1E6
|
|
$gh-tint-soft: $tint-warm-soft; // 暖白浅底 #FFF1E6
|
|
|
-$gh-wisdom-border: #E4E4F5; // 智维度徽章描边
|
|
|
|
|
-$gh-arrow-ink: $facade-text-slate; // 相生箭头
|
|
|
|
|
$gh-guide-bg-from: #FFF8F2; // 引导卡顶(暖白偏橙)
|
|
$gh-guide-bg-from: #FFF8F2; // 引导卡顶(暖白偏橙)
|
|
|
$gh-guide-bg-to: #FFFDFB; // 引导卡底
|
|
$gh-guide-bg-to: #FFFDFB; // 引导卡底
|
|
|
|
|
|
|
@@ -1106,7 +1034,6 @@ $gh-ic-wealth-bg: str-slice('#{$dim-wealth-deep}', 2);
|
|
|
$gh-ic-action-bg: str-slice('#{$dim-action-deep}', 2);
|
|
$gh-ic-action-bg: str-slice('#{$dim-action-deep}', 2);
|
|
|
$gh-ic-mind-bg: str-slice('#{$dim-mind-deep}', 2);
|
|
$gh-ic-mind-bg: str-slice('#{$dim-mind-deep}', 2);
|
|
|
$gh-white-bg: str-slice('#{$app-surface}', 2);
|
|
$gh-white-bg: str-slice('#{$app-surface}', 2);
|
|
|
-$gh-arrow-bg: str-slice('#{$gh-arrow-ink}', 2);
|
|
|
|
|
$gh-chev-bg: str-slice('#{$facade-text-slate}', 2);
|
|
$gh-chev-bg: str-slice('#{$facade-text-slate}', 2);
|
|
|
$gh-file-bg: str-slice('#{$dim-body-deep}', 2);
|
|
$gh-file-bg: str-slice('#{$dim-body-deep}', 2);
|
|
|
|
|
|
|
@@ -1118,8 +1045,8 @@ $gh-file-bg: str-slice('#{$dim-body-deep}', 2);
|
|
|
.gh-title { font-size: calc(52rpx * var(--font-scale, 1)); font-weight: 800; color: $facade-text-strong; line-height: 1.24; letter-spacing: 1rpx; margin-top: 12rpx; }
|
|
.gh-title { font-size: calc(52rpx * var(--font-scale, 1)); font-weight: 800; color: $facade-text-strong; line-height: 1.24; letter-spacing: 1rpx; margin-top: 12rpx; }
|
|
|
.gh-sub { font-size: calc(26rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.7; margin-top: 12rpx; }
|
|
.gh-sub { font-size: calc(26rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.7; margin-top: 12rpx; }
|
|
|
|
|
|
|
|
-/* 痛点条 */
|
|
|
|
|
-.gh-pain { margin: 0 32rpx 24rpx; display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; padding: 24rpx 28rpx; background: $app-surface; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; }
|
|
|
|
|
|
|
+/* 痛点条(压缩为一行:紧内边距,单行紧凑) */
|
|
|
|
|
+.gh-pain { margin: 0 32rpx 24rpx; display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; padding: 18rpx 24rpx; background: $app-surface; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; }
|
|
|
.gh-pain-quote { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 800; color: $brand-primary; margin-right: 16rpx; white-space: nowrap; }
|
|
.gh-pain-quote { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 800; color: $brand-primary; margin-right: 16rpx; white-space: nowrap; }
|
|
|
.gh-pain-desc { font-size: calc(24rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.6; }
|
|
.gh-pain-desc { font-size: calc(24rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.6; }
|
|
|
|
|
|
|
@@ -1170,43 +1097,11 @@ $gh-file-bg: str-slice('#{$dim-body-deep}', 2);
|
|
|
.gh-pending-sub { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-body; margin-top: 6rpx; }
|
|
.gh-pending-sub { font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-body; margin-top: 6rpx; }
|
|
|
.gh-pending-tag { flex-shrink: 0; font-size: calc(22rpx * var(--font-scale, 1)); font-weight: 700; color: $brand-primary; background: $gh-tint-soft; border-radius: 999rpx; padding: 6rpx 20rpx; }
|
|
.gh-pending-tag { flex-shrink: 0; font-size: calc(22rpx * var(--font-scale, 1)); font-weight: 700; color: $brand-primary; background: $gh-tint-soft; border-radius: 999rpx; padding: 6rpx 20rpx; }
|
|
|
|
|
|
|
|
-/* 演示雷达(卡片化:每个雷达独立 surface card) */
|
|
|
|
|
-.gh-demo { margin: 0 32rpx 24rpx; display: flex; flex-direction: column; }
|
|
|
|
|
-.gh-demo-block { background: $app-surface; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; padding: 28rpx 24rpx 16rpx; }
|
|
|
|
|
-.gh-demo-block + .gh-demo-block { margin-top: 20rpx; }
|
|
|
|
|
-.gh-demo-head { display: flex; flex-direction: row; align-items: center; }
|
|
|
|
|
-.gh-demo-name { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: 700; color: $facade-text-strong; }
|
|
|
|
|
-.gh-demo-tag { font-size: calc(20rpx * var(--font-scale, 1)); color: $dim-body-deep; background: $dim-body-tint; border: 1rpx solid $app-border-subtle; border-radius: 999rpx; padding: 4rpx 16rpx; margin-left: 16rpx; font-weight: 600; }
|
|
|
|
|
-.gh-demo-block:nth-child(2) .gh-demo-tag { color: $dim-wisdom-deep; background: $dim-wisdom-tint; border-color: $gh-wisdom-border; }
|
|
|
|
|
-.gh-demo-empty { background: $app-surface; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; padding: 96rpx 40rpx; display: flex; flex-direction: column; align-items: center; }
|
|
|
|
|
-.gh-demo-empty-text { font-size: calc(28rpx * var(--font-scale, 1)); color: $facade-text-strong; font-weight: 600; }
|
|
|
|
|
-.gh-demo-empty-sub { font-size: calc(24rpx * var(--font-scale, 1)); color: $facade-text-slate; margin-top: 16rpx; }
|
|
|
|
|
-
|
|
|
|
|
-/* 五维健康体系 */
|
|
|
|
|
|
|
+/* 五维速览(保留 5 行维度入口,删相生相克长文) */
|
|
|
.gh-wuxing { margin: 0 32rpx 24rpx; background: $app-surface; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; padding: 32rpx 28rpx; }
|
|
.gh-wuxing { margin: 0 32rpx 24rpx; background: $app-surface; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; padding: 32rpx 28rpx; }
|
|
|
.gh-wuxing-title { display: block; font-size: calc(32rpx * var(--font-scale, 1)); font-weight: 800; color: $facade-text-strong; line-height: 1.4; }
|
|
.gh-wuxing-title { display: block; font-size: calc(32rpx * var(--font-scale, 1)); font-weight: 800; color: $facade-text-strong; line-height: 1.4; }
|
|
|
.gh-wuxing-sub { display: block; font-size: calc(24rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.6; margin-top: 12rpx; }
|
|
.gh-wuxing-sub { display: block; font-size: calc(24rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.6; margin-top: 12rpx; }
|
|
|
|
|
|
|
|
-/* 相生 / 相克 */
|
|
|
|
|
-.gh-rel { margin-top: 24rpx; padding: 24rpx 24rpx 20rpx; border-radius: $uni-radius-lg; background: $app-bg; }
|
|
|
|
|
-.gh-rel-title { display: block; font-size: calc(24rpx * var(--font-scale, 1)); font-weight: 700; color: $facade-text-slate; letter-spacing: 1rpx; }
|
|
|
|
|
-.gh-chain { margin-top: 14rpx; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; }
|
|
|
|
|
-.gh-node { font-size: calc(24rpx * var(--font-scale, 1)); font-weight: 700; }
|
|
|
|
|
-.gh-node-body { color: $dim-body-deep; }
|
|
|
|
|
-.gh-node-wisdom { color: $dim-wisdom-deep; }
|
|
|
|
|
-.gh-node-wealth { color: $dim-wealth-deep; }
|
|
|
|
|
-.gh-node-action { color: $dim-action-deep; }
|
|
|
|
|
-.gh-node-mind { color: $dim-mind-deep; }
|
|
|
|
|
-.gh-arrow {
|
|
|
|
|
- width: 24rpx; height: 24rpx; margin: 0 8rpx; flex-shrink: 0;
|
|
|
|
|
- background-repeat: no-repeat;
|
|
|
|
|
- background-position: center;
|
|
|
|
|
- background-size: 24rpx 24rpx;
|
|
|
|
|
- background-image: gh-icon($gh-arrow-bg, '%3Cline x1=%225%22 y1=%2212%22 x2=%2219%22 y2=%2212%22/%3E%3Cpolyline points=%2212 5 19 12 12 19%22/%3E');
|
|
|
|
|
-}
|
|
|
|
|
-.gh-sep { font-size: calc(20rpx * var(--font-scale, 1)); color: $facade-text-slate; margin: 0 8rpx; }
|
|
|
|
|
-.gh-rel-hint { display: block; font-size: calc(22rpx * var(--font-scale, 1)); color: $facade-text-body; line-height: 1.65; margin-top: 14rpx; }
|
|
|
|
|
-
|
|
|
|
|
/* 五行 rows(首尾身/心 featured 暖底高亮,破五卡等权) */
|
|
/* 五行 rows(首尾身/心 featured 暖底高亮,破五卡等权) */
|
|
|
.gh-rows { margin-top: 28rpx; display: flex; flex-direction: column; }
|
|
.gh-rows { margin-top: 28rpx; display: flex; flex-direction: column; }
|
|
|
.gh-row { display: flex; flex-direction: row; align-items: center; padding: 20rpx 12rpx; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; background: $app-surface; }
|
|
.gh-row { display: flex; flex-direction: row; align-items: center; padding: 20rpx 12rpx; border: 1rpx solid $app-border-subtle; border-radius: $uni-radius-lg; background: $app-surface; }
|