|
|
@@ -116,6 +116,7 @@
|
|
|
<DimensionProducts
|
|
|
dimensionCode="mind"
|
|
|
:familyId="currentChildId"
|
|
|
+ :products="dimensionProducts"
|
|
|
title="为你推荐"
|
|
|
@productClick="goProductDetail"
|
|
|
@moreProducts="goMoreProducts" />
|
|
|
@@ -172,7 +173,7 @@ import PsychCrisisBanner from '../../components/PsychCrisisBanner.vue'
|
|
|
import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
|
|
|
import FamilyTianpanCard from '../../components/FamilyTianpanCard.vue'
|
|
|
import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
|
|
|
-import { getVisibleSections, getFeaturedArticles, getEmiReport, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getChildren, getVisibleFamilyMembers, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune } from '../../utils/api.js'
|
|
|
+import { getVisibleSections, getFeaturedArticles, getEmiReport, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getVisibleFamilyMembers, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune } from '../../utils/api.js'
|
|
|
import config from '../../config.js'
|
|
|
|
|
|
export default {
|
|
|
@@ -242,6 +243,7 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
sandboxData: null,
|
|
|
dimensionTasks: [],
|
|
|
dimensionActivities: [],
|
|
|
+ dimensionProducts: [],
|
|
|
contactList: [],
|
|
|
healthAlerts: [],
|
|
|
milestones: [],
|
|
|
@@ -446,6 +448,7 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
}
|
|
|
// 游客也能浏览活动和商品
|
|
|
this.loadDimensionActivities()
|
|
|
+ this.loadDimensionProducts()
|
|
|
this.loadFamilyFortune()
|
|
|
this._watchPageReady()
|
|
|
},
|
|
|
@@ -830,6 +833,15 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
}
|
|
|
}).catch(function() { self.dimensionActivities = [] })
|
|
|
},
|
|
|
+ loadDimensionProducts: function() {
|
|
|
+ var self = this
|
|
|
+ getProductsByDomain('mind', 1, 4).then(function(res) {
|
|
|
+ if (res && res.data) {
|
|
|
+ var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
|
|
|
+ self.dimensionProducts = list.slice(0, 4)
|
|
|
+ }
|
|
|
+ }).catch(function() { self.dimensionProducts = [] })
|
|
|
+ },
|
|
|
onFamilyMemberSelect: function(member) {
|
|
|
this.selectedMemberId = member.id
|
|
|
},
|