|
@@ -114,35 +114,9 @@
|
|
|
<FamilyEmptyState type="card" />
|
|
<FamilyEmptyState type="card" />
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- ===== 底部:维度任务/活动/商品 ===== -->
|
|
|
|
|
- <DimensionTasks
|
|
|
|
|
- v-if="isLoggedIn"
|
|
|
|
|
- :dimensionCode="currentDimensionCode"
|
|
|
|
|
- :tasks="dimensionTasks"
|
|
|
|
|
- @taskClick="onTaskClick"
|
|
|
|
|
- @moreTasks="goTasks" />
|
|
|
|
|
-
|
|
|
|
|
- <DimensionActivities
|
|
|
|
|
- :dimensionCode="currentDimensionCode"
|
|
|
|
|
- :activities="dimensionActivities"
|
|
|
|
|
- :isLoggedIn="isLoggedIn"
|
|
|
|
|
- @activityClick="goActivityDetail"
|
|
|
|
|
- @moreActivities="goMoreActivities" />
|
|
|
|
|
-
|
|
|
|
|
- <DimensionProducts
|
|
|
|
|
- dimensionCode="mind"
|
|
|
|
|
- :familyId="currentChildId"
|
|
|
|
|
- :products="dimensionProducts"
|
|
|
|
|
- title="推荐商品"
|
|
|
|
|
- @productClick="goProductDetail"
|
|
|
|
|
- @moreProducts="goMoreProducts" />
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- <!-- 推荐阅读 -->
|
|
|
|
|
- <ArticleBookshelf
|
|
|
|
|
- :articles="emotionArticles"
|
|
|
|
|
- :isLoggedIn="isLoggedIn"
|
|
|
|
|
- @articleClick="goArticleDetail"
|
|
|
|
|
- @moreArticles="goArticles" />
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<!-- ===== Phase 1.2: 心理告警横幅 ===== -->
|
|
<!-- ===== Phase 1.2: 心理告警横幅 ===== -->
|
|
|
<PsychCrisisBanner v-if="isLoggedIn" :memberId="currentChildId" source="screening" />
|
|
<PsychCrisisBanner v-if="isLoggedIn" :memberId="currentChildId" source="screening" />
|
|
@@ -181,20 +155,16 @@ import PageBanner from '../../components/PageBanner.vue'
|
|
|
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 FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
|
|
import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
|
|
|
-import DimensionTasks from '../../components/DimensionTasks.vue'
|
|
|
|
|
-import DimensionActivities from '../../components/DimensionActivities.vue'
|
|
|
|
|
-import DimensionProducts from '../../components/DimensionProducts.vue'
|
|
|
|
|
-import ArticleBookshelf from '../../components/ArticleBookshelf.vue'
|
|
|
|
|
import PsychCrisisBanner from '../../components/PsychCrisisBanner.vue'
|
|
import PsychCrisisBanner from '../../components/PsychCrisisBanner.vue'
|
|
|
import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
|
|
import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
|
|
|
import FamilyTianpanCard from '../../components/FamilyTianpanCard.vue'
|
|
import FamilyTianpanCard from '../../components/FamilyTianpanCard.vue'
|
|
|
import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
|
|
import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
|
|
|
-import { getVisibleSections, getFeaturedArticles, getEmiReport, getFamilyEnergySandbox, getTodayTasksByCategory, getActivityList, getProductsByDomain, getChildren, getVisibleFamilyMembers, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune } from '../../utils/api.js'
|
|
|
|
|
|
|
+import { getVisibleSections, getFamilyEnergySandbox, getChildren, getVisibleFamilyMembers, getEnergyOverview, getContactList, getHealthAlerts, getMilestones, getDanReportByChild, getFamilyFortune } from '../../utils/api.js'
|
|
|
import config from '../../config.js'
|
|
import config from '../../config.js'
|
|
|
import { parseDate } from '../../utils/format.js'
|
|
import { parseDate } from '../../utils/format.js'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
-components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnergyBar, DimensionTasks, DimensionActivities, DimensionProducts, ArticleBookshelf, PsychCrisisBanner, AIFloatingAvatar, FamilyTianpanCard, FamilyMemberStrip },
|
|
|
|
|
|
|
+components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnergyBar, PsychCrisisBanner, AIFloatingAvatar, FamilyTianpanCard, FamilyMemberStrip },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
isLoggedIn: false,
|
|
isLoggedIn: false,
|
|
@@ -258,9 +228,6 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
userName: '',
|
|
userName: '',
|
|
|
children: [],
|
|
children: [],
|
|
|
sandboxData: null,
|
|
sandboxData: null,
|
|
|
- dimensionTasks: [],
|
|
|
|
|
- dimensionActivities: [],
|
|
|
|
|
- dimensionProducts: [],
|
|
|
|
|
contactList: [],
|
|
contactList: [],
|
|
|
healthAlerts: [],
|
|
healthAlerts: [],
|
|
|
milestones: [],
|
|
milestones: [],
|
|
@@ -452,7 +419,6 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
|
|
this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
|
|
|
}
|
|
}
|
|
|
this.loadSectionConfig()
|
|
this.loadSectionConfig()
|
|
|
- this.loadFeaturedArticles()
|
|
|
|
|
if (this.isLoggedIn) {
|
|
if (this.isLoggedIn) {
|
|
|
this.loadChildren()
|
|
this.loadChildren()
|
|
|
this.loadFamilyMembersVisible()
|
|
this.loadFamilyMembersVisible()
|
|
@@ -467,8 +433,6 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
this.loadDanReports()
|
|
this.loadDanReports()
|
|
|
}
|
|
}
|
|
|
// 游客也能浏览活动和商品
|
|
// 游客也能浏览活动和商品
|
|
|
- this.loadDimensionActivities()
|
|
|
|
|
- this.loadDimensionProducts()
|
|
|
|
|
this.loadFamilyFortune()
|
|
this.loadFamilyFortune()
|
|
|
this._watchPageReady()
|
|
this._watchPageReady()
|
|
|
},
|
|
},
|
|
@@ -739,8 +703,6 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
loadDimensionData: function() {
|
|
loadDimensionData: function() {
|
|
|
- this.loadDimensionTasks()
|
|
|
|
|
- this.loadDimensionActivities()
|
|
|
|
|
if (this.familyMembersVisible.length > 0) {
|
|
if (this.familyMembersVisible.length > 0) {
|
|
|
this.loadCompatibilityData()
|
|
this.loadCompatibilityData()
|
|
|
}
|
|
}
|
|
@@ -928,10 +890,8 @@ components: { TabTransition, PageBanner, RadarChart, LoginGuideCard, FamilyEnerg
|
|
|
var self = this
|
|
var self = this
|
|
|
var unwatch = this.$watch(function() {
|
|
var unwatch = this.$watch(function() {
|
|
|
if (self.isLoggedIn) {
|
|
if (self.isLoggedIn) {
|
|
|
- return !!(self.emiData || self.energyOverview || (self.dimensionActivities && self.dimensionActivities.length > 0))
|
|
|
|
|
- }
|
|
|
|
|
- return !!(self.dimensionActivities && self.dimensionActivities.length > 0)
|
|
|
|
|
- }, function(val) {
|
|
|
|
|
|
|
+ return !!(self.emiData || self.energyOverview)
|
|
|
|
|
+ } }, function(val) {
|
|
|
if (val) {
|
|
if (val) {
|
|
|
if (unwatch) unwatch()
|
|
if (unwatch) unwatch()
|
|
|
if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
|
|
if (self.$refs.tabTransition) self.$refs.tabTransition.markReady()
|