|
|
@@ -43,7 +43,7 @@
|
|
|
</view>
|
|
|
<view class="feat-card" @click="handleGuestFeatureTap">
|
|
|
<text class="feat-icon">📋</text>
|
|
|
- <text class="feat-title">定期调研</text>
|
|
|
+ <text class="feat-title">成长回看</text>
|
|
|
<text class="feat-desc">每周家庭健康问卷</text>
|
|
|
</view>
|
|
|
<view class="feat-card" @click="handleGuestFeatureTap">
|
|
|
@@ -205,7 +205,7 @@
|
|
|
</view>
|
|
|
<view class="section">
|
|
|
<view class="survey-card">
|
|
|
- <text class="section-title-row">📋 定期调研</text>
|
|
|
+ <text class="section-title-row">📋 成长回看</text>
|
|
|
<view class="survey-pending" v-if="pendingSurvey">
|
|
|
<text class="survey-alert">⚠ 本周还未完成调研</text>
|
|
|
<text class="survey-title-text">{{ pendingSurvey.title }}</text>
|
|
|
@@ -263,6 +263,7 @@ export default {
|
|
|
dismissReminder: function() { this.hasIncomplete = false },
|
|
|
switchTab: function(key) { this.activeTab = key; this.loadTrackingData(key) },
|
|
|
handleProgressClick: function(item) {
|
|
|
+ if (!item || !item.key) return
|
|
|
var m = { checkin: '/pages/health/daily-checkin', diet: '/pages/health/diet-index', exercise: '/pages/health/exercise-index', sleep: '/pages/health/sleep-index', emotion: '/pages/mind/index' }
|
|
|
var url = m[item.key]
|
|
|
if (item.key === 'survey' && this.pendingSurvey && this.pendingSurvey.templateId) {
|
|
|
@@ -304,7 +305,7 @@ export default {
|
|
|
items.push({ key: 'exercise', icon: '🏃', label: '运动记录', done: false, actionText: '记录' })
|
|
|
items.push({ key: 'emotion', icon: '😊', label: '心情记录', done: false, actionText: '记录' })
|
|
|
items.push({ key: 'survey', icon: '📋', label: '本周调研', done: self.allDone, actionText: self.allDone ? '' : '开始' })
|
|
|
- self.progressItems = items
|
|
|
+ self.progressItems = items.filter(function(it) { return it && it.key })
|
|
|
self.incompleteCount = 0
|
|
|
for (var pi = 0; pi < items.length; pi++) if (items[pi] && !items[pi].done) self.incompleteCount++
|
|
|
self.hasIncomplete = self.incompleteCount > 0
|
|
|
@@ -316,7 +317,7 @@ export default {
|
|
|
if (statusRes.code === 200 && statusRes.data) {
|
|
|
var list = statusRes.data
|
|
|
self.pendingSurvey = null; self.allDone = true; var hasAny = false
|
|
|
- for (var si = 0; si < list.length; si++) { var s = list[si]; if (!s) continue; hasAny = true; if (s.status === 'pending') { self.pendingSurvey = { templateId: s.templateId, title: s.title || '定期调研', dimension: s.dimension || '' }; self.allDone = false } }
|
|
|
+ for (var si = 0; si < list.length; si++) { var s = list[si]; if (!s) continue; hasAny = true; if (s.status === 'pending') { self.pendingSurvey = { templateId: s.templateId, title: s.title || '成长回看', dimension: s.dimension || '' }; self.allDone = false } }
|
|
|
if (!hasAny) { self.pendingSurvey = null; self.allDone = false }
|
|
|
}
|
|
|
} catch(e) {}
|