|
@@ -397,7 +397,7 @@ import ArticleBookshelf from '../../components/ArticleBookshelf.vue'
|
|
|
import FamilyChallengeCard from '../../components/FamilyChallengeCard.vue'
|
|
import FamilyChallengeCard from '../../components/FamilyChallengeCard.vue'
|
|
|
import DailyTaskCard from '../../components/daily-task-card.vue'
|
|
import DailyTaskCard from '../../components/daily-task-card.vue'
|
|
|
import ReportUploadCard from '../../components/report-upload-card.vue'
|
|
import ReportUploadCard from '../../components/report-upload-card.vue'
|
|
|
-import { acceptParentInvite, productList, getActivityList, getFeaturedArticles, getEnergySandbox, getEnergyOverview, getFamilyMemberList, getChildren, getChallengeList, switchToFamilyMember, getMyMembership, updateChallengeProgress, respondChallenge, getTodayTasks, completeTask as completeTaskApi, getTodayParentTasks, completeParentTask as completeParentTaskApi, getTaskHistory, getNotices, getNotificationList, getSurveyStatus } from '../../utils/api.js'
|
|
|
|
|
|
|
+import { acceptParentInvite, productList, getActivityList, getFeaturedArticles, getEnergySandbox, getEnergyOverview, getFamilyMemberList, getChildren, getChallengeList, switchToFamilyMember, getMyMembership, updateChallengeProgress, respondChallenge, getTodayTasks, completeTask as completeTaskApi, getTodayParentTasks, completeParentTask as completeParentTaskApi, getTaskHistory, getNotices, getNotificationList, getSurveyStatus, getSelfCheckStatus } from '../../utils/api.js'
|
|
|
import nav from '../../utils/nav.js'
|
|
import nav from '../../utils/nav.js'
|
|
|
import config from '@/config.js'
|
|
import config from '@/config.js'
|
|
|
import { parseDate } from '../../utils/format.js'
|
|
import { parseDate } from '../../utils/format.js'
|
|
@@ -432,6 +432,8 @@ export default {
|
|
|
_splashReady: false,
|
|
_splashReady: false,
|
|
|
_watchPageReadyDone: false,
|
|
_watchPageReadyDone: false,
|
|
|
pendingSurveys: [],
|
|
pendingSurveys: [],
|
|
|
|
|
+ selfCheckScore: null,
|
|
|
|
|
+ selfCheckLoading: false,
|
|
|
|
|
|
|
|
typeList: [
|
|
typeList: [
|
|
|
{ label: '全部', value: '' },
|
|
{ label: '全部', value: '' },
|
|
@@ -556,7 +558,10 @@ export default {
|
|
|
},
|
|
},
|
|
|
selfTestSub: function() {
|
|
selfTestSub: function() {
|
|
|
if (this.sandboxData) {
|
|
if (this.sandboxData) {
|
|
|
- return '最近综合得分 ' + (this.sandboxData.overallScore || 0) + ' 分 · 点击重新自检'
|
|
|
|
|
|
|
+ if (this.selfCheckScore != null) {
|
|
|
|
|
+ return '最近自检得分 ' + this.selfCheckScore + '/45 分 · 点击查看'
|
|
|
|
|
+ }
|
|
|
|
|
+ return '最近综合得分 ' + (this.sandboxData.overallScore || 0) + ' 分 · 点击查看'
|
|
|
}
|
|
}
|
|
|
return '15 题五维自检 · 约 20 秒'
|
|
return '15 题五维自检 · 约 20 秒'
|
|
|
}
|
|
}
|
|
@@ -645,6 +650,7 @@ export default {
|
|
|
this.loadEnergyOverview()
|
|
this.loadEnergyOverview()
|
|
|
this.loadActionArticles()
|
|
this.loadActionArticles()
|
|
|
this.loadChallenges()
|
|
this.loadChallenges()
|
|
|
|
|
+ this.loadSelfCheckStatus()
|
|
|
},
|
|
},
|
|
|
loadEnergyOverview: function() {
|
|
loadEnergyOverview: function() {
|
|
|
var memberId = this.currentChildId || uni.getStorageSync('currentMemberId')
|
|
var memberId = this.currentChildId || uni.getStorageSync('currentMemberId')
|
|
@@ -999,10 +1005,18 @@ export default {
|
|
|
'&periodEnd=' + (firstPending.periodEnd || '')
|
|
'&periodEnd=' + (firstPending.periodEnd || '')
|
|
|
uni.navigateTo({ url: url })
|
|
uni.navigateTo({ url: url })
|
|
|
} else {
|
|
} else {
|
|
|
- // 无待填调研 → 进入五维自检(先花1分钟/再次了解·看看变化)
|
|
|
|
|
- uni.navigateTo({ url: '/pages/family/self-check' })
|
|
|
|
|
|
|
+ // 无待填调研 → 进入五维自检中间页
|
|
|
|
|
+ uni.navigateTo({ url: '/pages/family/self-check-entry' })
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ loadSelfCheckStatus: function() {
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ getSelfCheckStatus().then(function(res) {
|
|
|
|
|
+ if (res.code === 200 && res.data && res.data.lastResult) {
|
|
|
|
|
+ self.selfCheckScore = res.data.lastResult.totalScore
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(function() {})
|
|
|
|
|
+ },
|
|
|
_doInit(options) {
|
|
_doInit(options) {
|
|
|
options = options || {}
|
|
options = options || {}
|
|
|
if (!this.isLoggedIn()) {
|
|
if (!this.isLoggedIn()) {
|