|
|
@@ -71,83 +71,17 @@
|
|
|
<!-- 推荐阅读 -->
|
|
|
<DimensionArticles
|
|
|
dimensionCode="action"
|
|
|
- :articles="articles"
|
|
|
+ :articles="actionArticles"
|
|
|
:isLoggedIn="isLoggedIn"
|
|
|
@articleClick="goArticleDetail"
|
|
|
@moreArticles="goMoreArticles" />
|
|
|
|
|
|
- <!-- ===== 重要关系维护 ===== -->
|
|
|
- <view class="contact-section" v-if="isLoggedIn">
|
|
|
- <view class="contact-header">
|
|
|
- <text class="contact-section-title">重要关系</text>
|
|
|
- <view class="contact-header-right">
|
|
|
- <text class="contact-more" @click="loadContacts">刷新</text>
|
|
|
- <text class="contact-import-btn" @click="onShowImport">+ 导入</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <scroll-view class="contact-scroll" scroll-x enable-flex>
|
|
|
- <view class="contact-scroll-inner">
|
|
|
- <view class="contact-card-wrap" v-for="item in contactList" :key="item.id" @click="onContactClick(item)">
|
|
|
- <ContactCard :contact="item" />
|
|
|
- </view>
|
|
|
- <view class="contact-card-wrap contact-add-card" @click="onShowImport">
|
|
|
- <view class="add-card-inner">
|
|
|
- <text class="add-card-icon">+</text>
|
|
|
- <text class="add-card-label">导入通讯录</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </scroll-view>
|
|
|
- <view class="contact-empty" v-if="contactList.length === 0">
|
|
|
- <text class="contact-empty-text">暂无重要联系人,点击导入添加</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- ===== 关系健康概览 ===== -->
|
|
|
- <view class="rq-section" v-if="isLoggedIn && (healthAlerts.length > 0 || milestones.length > 0)">
|
|
|
- <view class="rq-header">
|
|
|
- <text class="rq-title">关系健康</text>
|
|
|
- <text class="rq-more" @click="goRelationshipQuestionnaire">去做问卷</text>
|
|
|
- </view>
|
|
|
- <!-- 健康预警列表 -->
|
|
|
- <view class="rq-alerts" v-if="healthAlerts.length > 0">
|
|
|
- <view class="rq-alert-card" v-for="alert in healthAlerts" :key="alert.memberId" @click="goInteractionLog(alert.memberId)">
|
|
|
- <view class="rq-alert-icon">
|
|
|
- <text class="rq-alert-emoji">⚠️</text>
|
|
|
- </view>
|
|
|
- <view class="rq-alert-info">
|
|
|
- <text class="rq-alert-name">{{ alert.memberName }}</text>
|
|
|
- <text class="rq-alert-desc">已{{ alert.daysSinceInteraction }}天无互动</text>
|
|
|
- </view>
|
|
|
- <view class="rq-alert-action">
|
|
|
- <text class="rq-alert-btn">去互动</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <!-- 里程碑列表 -->
|
|
|
- <view class="rq-milestones" v-if="milestones.length > 0">
|
|
|
- <view class="rq-milestone-card" v-for="m in milestones" :key="m.memberId">
|
|
|
- <view class="rq-milestone-icon">
|
|
|
- <text class="rq-milestone-emoji">🎂</text>
|
|
|
- </view>
|
|
|
- <view class="rq-milestone-info">
|
|
|
- <text class="rq-milestone-name">{{ m.memberName }}</text>
|
|
|
- <text class="rq-milestone-desc">{{ m.daysUntil > 0 ? m.daysUntil + '天后生日' : '今天生日' }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <!-- 快捷操作 -->
|
|
|
- <view class="rq-quick-actions">
|
|
|
- <view class="rq-action-btn" @click="goInteractionLog()">
|
|
|
- <text class="rq-action-icon">📝</text>
|
|
|
- <text class="rq-action-label">记录互动</text>
|
|
|
- </view>
|
|
|
- <view class="rq-action-btn" @click="goRelationshipQuestionnaire">
|
|
|
- <text class="rq-action-icon">🤝</text>
|
|
|
- <text class="rq-action-label">做关系问卷</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <!-- ===== 重要关系维护 + 关系健康概览 ===== -->
|
|
|
+ <FamilyRelationshipSection
|
|
|
+ :contactList="contactList"
|
|
|
+ :healthAlerts="healthAlerts"
|
|
|
+ :milestones="milestones"
|
|
|
+ :isLoggedIn="isLoggedIn" />
|
|
|
|
|
|
<!-- 功能入口(4个:活动、商品、课程) -->
|
|
|
<view class="func-section" v-if="sectionVisible('func_entries')">
|
|
|
@@ -184,11 +118,12 @@ import DimensionProducts from '../../components/DimensionProducts.vue'
|
|
|
import DimensionArticles from '../../components/DimensionArticles.vue'
|
|
|
import ContactCard from '../../components/ContactCard.vue'
|
|
|
import ContactImport from '../../components/ContactImport.vue'
|
|
|
+import FamilyRelationshipSection from '../../components/FamilyRelationshipSection.vue'
|
|
|
import FamilyRelationGraph from '../../components/FamilyRelationGraph.vue'
|
|
|
import { getVisibleSections, getEnergyOverview, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getContactList, getVisibleFamilyMembers, getFeaturedArticles, getHealthAlerts, getMilestones } from '../../utils/api.js'
|
|
|
|
|
|
export default {
|
|
|
- components: { TabTransition, PageBanner, LoginGuideCard, FamilyEnergyBar, UserQuickEntry, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, ContactCard, ContactImport, FamilyRelationGraph },
|
|
|
+ components: { TabTransition, PageBanner, LoginGuideCard, FamilyEnergyBar, UserQuickEntry, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, ContactCard, ContactImport, FamilyRelationGraph, FamilyRelationshipSection },
|
|
|
data() {
|
|
|
return {
|
|
|
showTabTransition: true,
|