|
|
@@ -97,6 +97,13 @@
|
|
|
@activityClick="goActivityDetail"
|
|
|
@moreActivities="goMoreActivities" />
|
|
|
|
|
|
+ <DimensionArticles
|
|
|
+ dimensionCode="action"
|
|
|
+ :articles="actionArticles"
|
|
|
+ :isLoggedIn="true"
|
|
|
+ @articleClick="goArticleDetail"
|
|
|
+ @moreArticles="goMoreArticles" />
|
|
|
+
|
|
|
<DimensionProducts
|
|
|
dimensionCode="action"
|
|
|
:products="dimensionProducts"
|
|
|
@@ -104,12 +111,11 @@
|
|
|
@productClick="goProductDetail"
|
|
|
@moreProducts="goMoreProducts" />
|
|
|
|
|
|
- <DimensionArticles
|
|
|
- dimensionCode="action"
|
|
|
- :articles="actionArticles"
|
|
|
- :isLoggedIn="true"
|
|
|
- @articleClick="goArticleDetail"
|
|
|
- @moreArticles="goMoreArticles" />
|
|
|
+ <!-- ===== 重要关系维护(章鱼图) ===== -->
|
|
|
+ <OctopusGraph
|
|
|
+ :contactList="contactList"
|
|
|
+ :healthAlerts="healthAlerts"
|
|
|
+ :isLoggedIn="true" />
|
|
|
|
|
|
<!-- 功能入口 -->
|
|
|
<view class="func-section">
|
|
|
@@ -122,6 +128,15 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 导入联系人弹窗 -->
|
|
|
+ <ContactImport
|
|
|
+ :visible="showImportModal"
|
|
|
+ @close="onCloseImport"
|
|
|
+ @success="onImportSuccess" />
|
|
|
+
|
|
|
+ <!-- 底部占位 -->
|
|
|
+ <view class="bottom-spacer" style="height: 40rpx;"></view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 未登录态 — 发现页/引流内容,直接内嵌,不跳转 -->
|
|
|
@@ -301,8 +316,10 @@ import DimensionTasks from '../../components/DimensionTasks.vue'
|
|
|
import DimensionActivities from '../../components/DimensionActivities.vue'
|
|
|
import DimensionProducts from '../../components/DimensionProducts.vue'
|
|
|
import DimensionArticles from '../../components/DimensionArticles.vue'
|
|
|
+import OctopusGraph from '../../components/OctopusGraph.vue'
|
|
|
+import ContactImport from '../../components/ContactImport.vue'
|
|
|
import LoginGuideCard from '../../components/LoginGuideCard.vue'
|
|
|
-import { acceptParentInvite, productList, getActivityList, getFeaturedArticles, getFamilyEnergySandbox, getVisibleFamilyMembers, getTodayTasksByCategory, getChildren, getEnergyOverview, getProductsByDomain, getHealthAlerts } from '../../utils/api.js'
|
|
|
+import { acceptParentInvite, productList, getActivityList, getFeaturedArticles, getFamilyEnergySandbox, getVisibleFamilyMembers, getTodayTasksByCategory, getChildren, getEnergyOverview, getProductsByDomain, getHealthAlerts, getContactList } from '../../utils/api.js'
|
|
|
|
|
|
var DIMENSIONS = [
|
|
|
{ code: 'body', name: '身', icon: '🌏', color: '#8D6E63', bgColor: 'rgba(141,110,99,0.15)', title: '主动健康', desc: '用最适合的方法,从根源调理家人体质,畅享高质量长寿生活' },
|
|
|
@@ -323,6 +340,8 @@ export default {
|
|
|
DimensionActivities,
|
|
|
DimensionProducts,
|
|
|
DimensionArticles,
|
|
|
+ OctopusGraph,
|
|
|
+ ContactImport,
|
|
|
LoginGuideCard
|
|
|
},
|
|
|
data() {
|
|
|
@@ -377,6 +396,8 @@ export default {
|
|
|
articles: [],
|
|
|
children: [],
|
|
|
currentChildId: null,
|
|
|
+ contactList: [],
|
|
|
+ showImportModal: false,
|
|
|
healthAlerts: [],
|
|
|
funcList: [
|
|
|
{ icon: '\u{1F3CB}', label: '任务', page: '/pages/tasks/tasks' },
|
|
|
@@ -462,6 +483,7 @@ export default {
|
|
|
// ===== 登录态数据加载 =====
|
|
|
loadLoggedInData: function() {
|
|
|
this.loadFamilyMembers()
|
|
|
+ this.loadContacts()
|
|
|
this.loadChildren()
|
|
|
},
|
|
|
loadChildren: function() {
|
|
|
@@ -574,6 +596,24 @@ export default {
|
|
|
}
|
|
|
}).catch(function() {})
|
|
|
},
|
|
|
+ loadContacts: function() {
|
|
|
+ var self = this
|
|
|
+ getContactList({}).then(function(res) {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ self.contactList = Array.isArray(res.data) ? res.data : []
|
|
|
+ }
|
|
|
+ }).catch(function() {})
|
|
|
+ },
|
|
|
+ onShowImport: function() {
|
|
|
+ this.showImportModal = true
|
|
|
+ },
|
|
|
+ onCloseImport: function() {
|
|
|
+ this.showImportModal = false
|
|
|
+ },
|
|
|
+ onImportSuccess: function() {
|
|
|
+ this.showImportModal = false
|
|
|
+ this.loadContacts()
|
|
|
+ },
|
|
|
parseRelatedDimensions: function(val) {
|
|
|
if (!val) return []
|
|
|
if (Array.isArray(val)) return val
|