| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858 |
- <template>
- <view class="body-container">
- <!-- Tabbar 切换过渡页 -->
- <tab-transition v-if="showTabTransition" dimCode="body" ref="tabTransition" @close="showTabTransition = false" />
- <!-- 品牌定位语(登录前显示) -->
- <view class="brand-strap" v-if="!isLoggedIn">
- <text class="brand-strap-text">科学管理全家健康数据</text>
- </view>
- <!-- 雷达图(始终显示,无用户数据时仅显示人群平均值) -->
- <view class="section">
- <view class="section-header">
- <text class="section-title">健康指标</text>
- <text class="section-sub">身体健康各项指标,分数越高代表越健康</text>
- <text class="avg-badge" v-if="!dimensionData">同龄同性平均值 · 上传健康报告后显示个人数据</text>
- </view>
- <RadarChart
- v-if="radarDimensions && radarDimensions.length >= 3"
- :dimensions="radarDimensions"
- :scores="radarScores"
- :avg-scores="radarAvgScores"
- fillColor="#FF8C42"
- gridColor="#FED7AA"
- labelColor="#9A3412"
- :width="580"
- :height="580"
- @dimensionClick="goDimensionDetail" />
- </view>
- <!-- 家庭成员选择条 -->
- <FamilyMemberStrip
- v-if="currentView === 'self' && isLoggedIn"
- :members="familyMembersVisible"
- :selectedMemberId="selectedMemberId"
- @select="onFamilyMemberSelect"
- @removed="loadFamilyMembersVisible" />
- <!-- 游客引导语(每月更换) -->
- <view class="monthly-guidance" v-if="!isLoggedIn">
- <text class="guidance-icon">🌿</text>
- <text class="guidance-text">{{ monthlyGuidance }}</text>
- </view>
- <!-- 登录后:五维能量条 -->
- <FamilyEnergyBar
- v-if="isLoggedIn"
- dimensionCode="body"
- :sandboxData="sandboxData"
- :dualDimension="dualDimension" />
- <!-- 健康七维 -->
- <dimension-sub-dims
- v-if="isLoggedIn && healthSubDims.length > 0"
- title="🌿 健康七维"
- subtitle="身体各项健康指标,分数越高代表越健康"
- accent-color="#FF8C42"
- :dims="healthSubDims" />
- <!-- 功能入口 -->
- <view class="func-section" v-if="sectionVisible('func_entries')">
- <view class="func-grid">
- <view class="func-item" v-for="item in funcList" :key="item.label" @click="onFuncClick(item)">
- <view class="func-icon-wrap">
- <text class="func-icon">{{ item.icon }}</text>
- </view>
- <text class="func-label">{{ item.label }}</text>
- </view>
- </view>
- </view>
- <!-- ===== 精准营养(上传报告+产品+文章) ===== -->
- <view class="section nutrition-section" v-if="isLoggedIn">
- <view class="section-header">
- <text class="section-title">🥗 精准营养</text>
- </view>
- <!-- 上传报告入口 -->
- <view class="nutrition-report-card" @click="goToUploadReport">
- <view class="nutrition-report-left">
- <text class="nutrition-icon-large">📋</text>
- </view>
- <view class="nutrition-report-right">
- <text class="nutrition-title">上传健康报告</text>
- <text class="nutrition-desc">上传体检报告或肠道检测报告,解读分析,获取个性化营养方案</text>
- <view class="nutrition-report-tags">
- <text class="tag">体检报告</text>
- <text class="tag">肠道检测</text>
- <text class="tag">解读</text>
- </view>
- </view>
- <text class="nutrition-arrow">›</text>
- </view>
- </view>
- <!-- 身维度介绍卡片(登录后显示) -->
- <DimensionIntroCard dimCode="body" v-if="isLoggedIn" learn-more-url="/pages/body-detail/dimension-intro" />
- <!-- 底部占位 -->
- <view class="bottom-spacer"></view>
- <FloatingAvatar />
- </view>
- </template>
- <script>
- import TabTransition from '../../components/tab-transition.vue'
- import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
- import RadarChart from '../../components/RadarChart.vue'
- import DimensionSubDims from '../../components/DimensionSubDims.vue'
- import FloatingAvatar from '../../components/AIFloatingAvatar.vue'
- import DimensionIntroCard from '../../components/DimensionIntroCard.vue'
- import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
- import { getVisibleSections, getEnergyOverview, getFamilyEnergySandbox, getEnergySandbox, getFamilyMemberList, getDimensionOverview } from '../../utils/api.js'
- export default {
- components: { TabTransition, FamilyEnergyBar, RadarChart, DimensionSubDims, FloatingAvatar, FamilyMemberStrip, DimensionIntroCard },
- data() {
- return {
- isLoggedIn: false,
- role: null,
- showTabTransition: true,
- activeChildId: null,
- selectedMemberId: null,
- activeChildName: '',
- userName: '',
- children: [],
- familyMembersVisible: [],
- // 接口数据是否已检查(避免"暂无数据"闪烁)
- childrenChecked: false,
- membersChecked: false,
- healthSubDims: [],
- sandboxData: null,
- currentView: 'self', // 'self' | 'family'
- dualDimension: null,
- visibleSections: [],
- dimensionData: null,
- /** Mock 平均值(7维):生长发育/睡眠质量/视力健康/免疫力/营养均衡/肠胃健康/运动活力 */
- radarAvgScores: [72, 68, 75, 70, 73, 69, 71],
- funcList: [
- { icon: '\u{1F3C3}', label: '运动', needLogin: true, page: '/pages/body/exercise-record' },
- { icon: '\u{1F957}', label: '饮食', needLogin: true, page: '/pages/diet/index' },
- { icon: '\u{1F634}', label: '作息', needLogin: true, page: '/pages/body/sleep-record' },
- { icon: '\u{1F9D8}', label: '冥想', needLogin: true, page: '/pages/health/meditation-index' },
- { icon: '\u{1F4CA}', label: '舌诊', needLogin: true, page: '/pages/health/report-upload?reportType=tongue' },
- // 问答功能已屏蔽: { icon: '\u{1F3E5}', label: '健康管家', needLogin: true, page: '/pages/ai/chat?mode=butler&fromPage=pages/body/index' },
- { icon: '\u{1F9EC}', label: '健康维度', needLogin: true, page: 'health-dimensions' }
- ]
- }
- },
- computed: {
- /** 七维雷达图:维度标签(API无数据时使用默认标签) */
- radarDimensions: function() {
- var dims = this.dimensionData && this.dimensionData.dimensions
- if (dims && dims.length > 0) {
- var result = []
- for (var i = 0; i < dims.length; i++) {
- var d = dims[i]
- if (!d) continue
- result.push({ label: d.label || '', key: d.dimension || '' })
- }
- return result
- }
- // 无数据时使用默认七维标签
- return [
- { label: '生长发育', key: 'growth' },
- { label: '睡眠质量', key: 'sleep' },
- { label: '视力健康', key: 'vision' },
- { label: '免疫力', key: 'immunity' },
- { label: '营养均衡', key: 'nutrition' },
- { label: '肠胃健康', key: 'gut' },
- { label: '运动活力', key: 'exercise' }
- ]
- },
- /** 七维雷达图:分值(无数据时返回空数组,仅显示平均值) */
- radarScores: function() {
- var dims = this.dimensionData && this.dimensionData.dimensions
- if (!dims) return []
- var result = []
- for (var i = 0; i < dims.length; i++) {
- var d = dims[i]
- if (!d) { result.push(0); continue }
- var s = d.score
- if (typeof s !== 'number' || isNaN(s) || s === null) s = 0
- result.push(s)
- }
- return result
- },
- /** 每月引导语 */
- monthlyGuidance: function() {
- var month = new Date().getMonth()
- var messages = [
- '一月:新年新健康,从一次体检开始',
- '二月:春暖花开,适合调整作息',
- '三月:植树节到,守护呼吸健康',
- '四月:踏青正当时,关注视力保护',
- '五月:劳动节后,重视营养均衡',
- '六月:夏日来临,关注肠胃健康',
- '七月:暑期到来,规律运动不可少',
- '八月:秋前调养,提升免疫力',
- '九月:开学季,关注孩子生长发育',
- '十月:国庆长假,注意饮食控制',
- '十一月:秋冬交替,保暖防寒',
- '十二月:年终总结,规划来年健康'
- ]
- return messages[month] || messages[0]
- }
- },
- onShow() {
- this.showTabTransition = true
- var token = uni.getStorageSync('token')
- this.isLoggedIn = !!token
- if (this.isLoggedIn) {
- this.role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
- this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
- }
- this.loadSectionConfig()
- if (this.isLoggedIn) {
- this.loadChildren()
- }
- // 游客也能浏览活动和商品
- // 游客也能浏览文章
- this._watchPageReady()
- },
- methods: {
- loadSectionConfig: function() {
- var baseSections = ['func_entries']
- if (!uni.getStorageSync('token')) {
- this.visibleSections = baseSections
- return
- }
- var role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
- var self = this
- getVisibleSections({ pageKey: 'body', role: role }).then(function(res) {
- if (res.code === 200 && res.data) {
- var keys = res.data.map(function(s) { return s.sectionKey })
- var merged = baseSections.slice()
- keys.forEach(function(k) { if (merged.indexOf(k) === -1) merged.push(k) })
- self.visibleSections = merged
- }
- }).catch(function(e) {
- self.visibleSections = ['func_entries']
- })
- },
- loadChildren: function() {
- var self = this
- getFamilyMemberList({ visibleOnly: true }).then(function(res) {
- if (res.code === 200 && res.data) {
- var raw = res.data || []
- // 统一字段:familyMemberList 返回 id,getChildren 返回 memberId
- self.children = raw.map(function(m) { return { id: m.id, memberId: m.id, name: m.nickname || m.name, nickname: m.nickname || m.name } })
- self.familyMembersVisible = raw
- var savedChildId = uni.getStorageSync('currentChildId')
- var found = false
- for (var i = 0; i < self.children.length; i++) {
- if (self.children[i].memberId === savedChildId) {
- self.activeChildId = savedChildId
- self.activeChildName = self.children[i].name || self.children[i].nickname || '孩子'
- found = true
- break
- }
- }
- if (!found && self.children.length > 0) {
- self.activeChildId = self.children[0].memberId
- self.activeChildName = self.children[0].name || self.children[0].nickname || '孩子'
- uni.setStorageSync('currentChildId', self.activeChildId)
- }
- if (self.activeChildId) {
- self.loadDashboardData()
- }
- }
- self.childrenChecked = true
- self.membersChecked = true
- }).catch(function(e) {
- console.log('获取孩子列表失败', e)
- self.children = []
- self.familyMembersVisible = []
- self.childrenChecked = true
- self.membersChecked = true
- })
- },
- loadDashboardData: function() {
- if (!this.activeChildId) return
- this.loadEnergyData()
- this.loadSandboxData()
- this.loadHealthDimensions()
- },
- loadFamilyMembersVisible: function() {
- this.loadChildren()
- },
- loadHealthDimensions: function() {
- var memberId = this.activeChildId || (this.userInfo && this.userInfo.userId)
- if (!memberId) {
- console.log('[body] loadHealthDimensions skipped: no memberId')
- return
- }
- var self = this
- getDimensionOverview({ memberId: memberId }).then(function(res) {
- if (res && res.data) {
- self.dimensionData = res.data
- self.healthSubDims = (self.dimensionData.dimensions || []).map(function(d) { return {label: d.label || d.dimension, score: d.score || 0, desc: d.description || ''}; });
- console.log('[body] dimensionData loaded:', res.data.dimensions ? res.data.dimensions.length : 0, 'dimensions')
- } else if (res) {
- console.warn('[body] dimension API error:', res.message || res.code)
- }
- }).catch(function(e) {
- console.error('[body] loadHealthDimensions failed', e)
- })
- },
- loadSandboxData: function() {
- var self = this
- getFamilyEnergySandbox().then(function(res) {
- if (res && res.data) {
- self.sandboxData = res.data
- }
- }).catch(function(e) {
- console.log('获取沙盘数据失败', e)
- })
- },
- switchView: function(view) {
- this.currentView = view
- if (view === 'family') {
- this.selectedMemberId = null
- var self = this
- getEnergySandbox('family').then(function(res) {
- if (res && res.data && !res.data.locked) {
- self.sandboxData = res.data.familyData || res.data
- }
- }).catch(function(e) { console.log('获取家庭数据失败', e) })
- } else {
- this.loadSandboxData()
- }
- },
- loadEnergyData: function() {
- var self = this
- getEnergyOverview(this.activeChildId).then(function(res) {
- if (res && res.data) {
- var dims = res.data.dimensions
- if (dims && dims.length > 0) {
- for (var i = 0; i < dims.length; i++) {
- if (dims[i].code === 'body') {
- self.dualDimension = dims[i]
- break
- }
- }
- }
- }
- }).catch(function(e) {
- console.log('获取能量概览失败', e)
- })
- },
- onFamilyMemberSelect: function(member) {
- this.selectedMemberId = member.id
- },
- onChildChanged: function(child) {
- this.activeChildId = child.memberId
- this.activeChildName = child.name || child.nickname || '孩子'
- this.loadDashboardData()
- },
- scrollToSection: function(section) {
- uni.pageScrollTo({ selector: '#' + section, duration: 300 })
- },
- sectionVisible: function(key) {
- return this.visibleSections.length === 0 || this.visibleSections.indexOf(key) !== -1
- },
- onFuncClick: function(item) {
- if (item.needLogin && !this.isLoggedIn) {
- uni.showModal({
- title: '提示',
- content: '请先登录后使用此功能',
- success: function(res) {
- if (res.confirm) uni.navigateTo({ url: '/pages/login/login' })
- }
- })
- return
- }
- if (item.page === 'health-dimensions') {
- if (!this.activeChildId) {
- uni.showToast({ title: '请先选择孩子', icon: 'none' })
- return
- }
- uni.navigateTo({ url: '/pages/body-detail/health-dimensions?memberId=' + this.activeChildId })
- return
- }
- if (item.page) uni.navigateTo({ url: item.page })
- },
- goDimensionDetail: function(dimKey) {
- uni.navigateTo({ url: '/pages/body-detail/dimension-detail?dimension=' + dimKey + '&memberId=' + this.activeChildId })
- },
- goToCheckin: function() {
- var id = this.activeChildId || uni.getStorageSync('currentChildId')
- if (!id) {
- uni.showToast({ title: '请先选择成员', icon: 'none' })
- return
- }
- uni.navigateTo({ url: '/pages/body-detail/checkin?memberId=' + id })
- },
- goToNutritionProfile: function() {
- var id = this.activeChildId || uni.getStorageSync('currentChildId')
- if (!id) {
- uni.showToast({ title: '请先选择成员', icon: 'none' })
- return
- }
- uni.navigateTo({ url: '/pages/health/nutrition-profile?memberId=' + id })
- },
- goToUploadReport: function() {
- var id = this.activeChildId || uni.getStorageSync('currentChildId') || ''
- uni.navigateTo({ url: '/pages/health/report-upload?memberId=' + id + '&from=body' })
- },
- _watchPageReady() {
- var self = this
- var unwatch = this.$watch(function() {
- if (self.isLoggedIn) {
- return !!(self.dualDimension || self.sandboxData)
- } }, function(val) {
- if (val) {
- if (unwatch) unwatch()
- if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
- }
- })
- }
- }
- }
- </script>
- .view-toggle {
- display: flex;
- margin: 20rpx 30rpx;
- background: rgba(255,255,255,0.12);
- border-radius: 12rpx;
- padding: 6rpx;
- }
- .toggle-btn {
- flex: 1;
- text-align: center;
- padding: 12rpx 0;
- border-radius: 8rpx;
- font-size: 26rpx;
- color: rgba(255,255,255,0.65);
- }
- .toggle-btn.active {
- background: rgba(255,255,255,0.22);
- color: #fff;
- font-weight: 600;
- }
- /* 页面说明 */
- .section-sub {
- font-size: 22rpx;
- color: rgba(255,255,255,0.55);
- margin-top: 6rpx;
- display: block;
- }
- /* 得分解读卡片 */
- .score-explain-card {
- margin: 20rpx 30rpx;
- padding: 28rpx 24rpx;
- background: rgba(255,255,255,0.1);
- border-radius: 20rpx;
- border: 1rpx solid rgba(255,255,255,0.15);
- }
- .explain-header {
- display: flex;
- align-items: center;
- margin-bottom: 14rpx;
- }
- .explain-icon {
- font-size: 36rpx;
- margin-right: 10rpx;
- }
- .explain-title {
- font-size: 28rpx;
- font-weight: 600;
- color: #fff;
- }
- .explain-text {
- font-size: 26rpx;
- color: rgba(255,255,255,0.8);
- line-height: 1.6;
- }
- /* 子维度评分卡 */
- .subdim-section {
- margin: 20rpx 30rpx;
- }
- .subdim-cards {
- background: rgba(255,255,255,0.08);
- border-radius: 20rpx;
- overflow: hidden;
- border: 1rpx solid rgba(255,255,255,0.12);
- }
- .subdim-card {
- padding: 24rpx 28rpx;
- border-bottom: 1rpx solid rgba(255,255,255,0.08);
- }
- .subdim-card:last-child {
- border-bottom: none;
- }
- .subdim-card-left {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 12rpx;
- }
- .subdim-card-label {
- font-size: 28rpx;
- font-weight: 600;
- color: #fff;
- }
- .subdim-card-desc {
- font-size: 22rpx;
- color: rgba(255,255,255,0.5);
- margin-top: 4rpx;
- }
- .subdim-card-right {
- text-align: right;
- }
- .subdim-card-score {
- font-size: 36rpx;
- font-weight: 700;
- }
- .subdim-bar-track {
- height: 8rpx;
- background: rgba(255,255,255,0.1);
- border-radius: 4rpx;
- overflow: hidden;
- margin-top: 8rpx;
- }
- .subdim-bar-fill {
- height: 100%;
- border-radius: 4rpx;
- transition: width 0.5s ease;
- }
- <style scoped>
- .body-container {
- min-height: 100vh;
- background: #f5f7fa;
- padding-bottom: 120rpx;
- }
- /* ===== 功能入口 ===== */
- .func-section {
- margin: 20rpx 30rpx;
- }
- .func-grid {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- background: #fff;
- border-radius: 20rpx;
- padding: 24rpx 16rpx;
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
- }
- .func-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- flex: 1;
- }
- .func-icon-wrap {
- width: 80rpx;
- height: 80rpx;
- border-radius: 40rpx;
- background: linear-gradient(135deg, #D6EAF8, #EBF2FA);
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 10rpx;
- }
- .func-icon {
- font-size: 40rpx;
- }
- .func-label {
- font-size: 22rpx;
- color: #666;
- font-weight: 500;
- }
- /* ===== 通用区块 ===== */
- .section {
- margin: 20rpx 30rpx;
- }
- .section-header {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 16rpx;
- }
- .section-title {
- font-size: 30rpx;
- font-weight: bold;
- color: #333;
- }
- .avg-badge {
- font-size: 20rpx;
- color: #F97316;
- background: #FFF7ED;
- padding: 4rpx 12rpx;
- border-radius: 20rpx;
- margin-left: 12rpx;
- }
- /* ===== 快捷操作 ===== */
- .quick-actions {
- display: flex;
- flex-direction: row;
- margin-top: 30rpx;
- }
- .action-btn {
- flex: 1;
- background: #fff;
- border-radius: 16rpx;
- padding: 24rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- margin-right: 20rpx;
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
- }
- .action-btn:last-child {
- margin-right: 0;
- }
- .action-icon {
- font-size: 48rpx;
- margin-bottom: 8rpx;
- }
- .action-text {
- font-size: 26rpx;
- color: #666;
- }
- /* ===== 底部 ===== */
- .bottom-spacer {
- height: 120rpx;
- }
- .func-item:active, .action-btn:active {
- opacity: 0.7;
- }
- /* ===== 精准营养 ===== */
- .nutrition-section {
- margin-top: 20rpx;
- }
- .nutrition-report-card {
- display: flex;
- flex-direction: row;
- align-items: center;
- background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
- border-radius: 20rpx;
- padding: 28rpx 24rpx;
- margin-bottom: 20rpx;
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
- }
- .nutrition-report-left {
- width: 100rpx;
- height: 100rpx;
- background: rgba(255,255,255,0.7);
- border-radius: 20rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 20rpx;
- flex-shrink: 0;
- }
- .nutrition-icon-large {
- font-size: 52rpx;
- }
- .nutrition-report-right {
- flex: 1;
- }
- .nutrition-title {
- font-size: 30rpx;
- font-weight: bold;
- color: #2E7D32;
- display: block;
- margin-bottom: 6rpx;
- }
- .nutrition-desc {
- font-size: 22rpx;
- color: #558B2F;
- line-height: 1.5;
- display: block;
- margin-bottom: 10rpx;
- }
- .nutrition-report-tags {
- display: flex;
- flex-direction: row;
- gap: 10rpx;
- }
- .nutrition-report-tags .tag {
- font-size: 20rpx;
- color: #33691E;
- background: rgba(255,255,255,0.6);
- padding: 4rpx 14rpx;
- border-radius: 20rpx;
- }
- .nutrition-arrow {
- font-size: 40rpx;
- color: #A5D6A7;
- margin-left: 12rpx;
- }
- .nutrition-links {
- margin-bottom: 20rpx;
- }
- .links-label {
- font-size: 26rpx;
- font-weight: bold;
- color: #333;
- display: block;
- margin-bottom: 12rpx;
- }
- .links-row {
- display: flex;
- flex-direction: row;
- gap: 16rpx;
- }
- .link-item {
- flex: 1;
- display: flex;
- flex-direction: row;
- align-items: center;
- background: #fff;
- border-radius: 16rpx;
- padding: 20rpx 18rpx;
- box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
- gap: 12rpx;
- }
- .link-item:active {
- opacity: 0.7;
- }
- .link-icon {
- font-size: 36rpx;
- flex-shrink: 0;
- }
- .link-texts {
- flex: 1;
- }
- .link-name {
- font-size: 24rpx;
- font-weight: 500;
- color: #333;
- display: block;
- margin-bottom: 4rpx;
- }
- .link-desc {
- font-size: 20rpx;
- color: #999;
- display: block;
- }
- .link-arrow {
- font-size: 32rpx;
- color: #CCC;
- flex-shrink: 0;
- }
- /* ===== 推荐阅读 ===== */
- .article-list {
- display: flex;
- flex-direction: column;
- gap: 16rpx;
- }
- .article-card {
- background: #fff;
- border-radius: 16rpx;
- padding: 24rpx;
- box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
- }
- .article-card:active {
- opacity: 0.8;
- }
- .article-category {
- display: inline-block;
- padding: 4rpx 14rpx;
- border-radius: 8rpx;
- margin-bottom: 10rpx;
- }
- .article-category-text {
- font-size: 20rpx;
- color: #fff;
- }
- .article-title {
- display: block;
- font-size: 28rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 8rpx;
- line-height: 1.4;
- }
- .article-summary {
- display: block;
- font-size: 24rpx;
- color: #888;
- line-height: 1.5;
- margin-bottom: 12rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- .article-meta {
- display: flex;
- align-items: center;
- gap: 16rpx;
- }
- .meta-item {
- display: flex;
- align-items: center;
- gap: 4rpx;
- }
- .meta-icon {
- font-size: 24rpx;
- }
- .meta-text {
- font-size: 22rpx;
- color: #999;
- }
- .article-date {
- font-size: 22rpx;
- color: #bbb;
- }
- /* 品牌定位语 */
- .brand-strap {
- margin: 16rpx 30rpx 0;
- padding: 20rpx 28rpx;
- background: linear-gradient(135deg, #FFF7ED, rgba(255,140,66,0.12));
- border-radius: 16rpx;
- border-left: 4rpx solid #FF8C42;
- }
- .brand-strap-text {
- font-size: 26rpx;
- color: #9A3412;
- font-weight: 500;
- }
- /* 每月引导语 */
- .monthly-guidance {
- margin: 16rpx 30rpx 0;
- padding: 20rpx 28rpx;
- background: linear-gradient(135deg, #FFF7ED, rgba(255,140,66,0.08));
- border-radius: 16rpx;
- border-left: 4rpx solid #FF8C42;
- display: flex;
- align-items: center;
- gap: 12rpx;
- }
- .guidance-icon {
- font-size: 32rpx;
- }
- .guidance-text {
- font-size: 26rpx;
- color: #9A3412;
- font-weight: 500;
- }
- </style>
|