|
|
@@ -59,6 +59,16 @@
|
|
|
<text class="ai-q-arrow">›</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 意图问卷提醒(跳过过但还没做问卷的用户) -->
|
|
|
+ <view v-if="showIntentReminder" class="intent-reminder" @click="goIntentQuiz">
|
|
|
+ <view class="reminder-icon">💡</view>
|
|
|
+ <view class="reminder-body">
|
|
|
+ <text class="reminder-text">还没完成健康问卷?</text>
|
|
|
+ <text class="reminder-sub">花1分钟回答几道题,系统为你推荐最合适的五维方向</text>
|
|
|
+ </view>
|
|
|
+ <text class="reminder-arrow">›</text>
|
|
|
+ </view>
|
|
|
<!-- 数据预览(示例) -->
|
|
|
<view class="demo-section">
|
|
|
<view class="demo-section-head">
|
|
|
@@ -287,6 +297,8 @@ export default {
|
|
|
reports: [],
|
|
|
lastPlan: '',
|
|
|
healthArticles: [],
|
|
|
+ intentData: null,
|
|
|
+ showIntentReminder: false,
|
|
|
tabs: [
|
|
|
{ code: 'body', label: '健康', icon: '🟠', color: '#FF8C42' },
|
|
|
{ code: 'cognitive', label: '认知', icon: '🧠', color: '#6366F1' },
|
|
|
@@ -520,6 +532,7 @@ export default {
|
|
|
},
|
|
|
goSelfTest: function() { uni.navigateTo({ url: '/pages/health/survey-questionnaire?dim=all' }) },
|
|
|
goAiQuestionnaire: function() { uni.navigateTo({ url: '/pages/health/ai-questionnaire' }) },
|
|
|
+ goIntentQuiz: function() { uni.navigateTo({ url: '/pages/health/intent-quiz' }) },
|
|
|
goPlanSummary: function() {
|
|
|
var url = '/pages/health/health-plan-summary'
|
|
|
if (this.selectedMemberId) url += '?memberId=' + this.selectedMemberId
|
|
|
@@ -530,6 +543,14 @@ export default {
|
|
|
try {
|
|
|
var api = require('../../utils/api.js')
|
|
|
var memberId = uni.getStorageSync('currentChildId') || uni.getStorageSync('currentMemberId') || uni.getStorageSync('userId') || ''
|
|
|
+ // 检查意图状态
|
|
|
+ api.getUserIntent().then(function(res) {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ self.intentData = res.data
|
|
|
+ var skipCount = res.data.skipCount || 0
|
|
|
+ self.showIntentReminder = !res.data.intentType && skipCount > 0 && skipCount < 3
|
|
|
+ }
|
|
|
+ }).catch(function() {})
|
|
|
// 健康报告(memberId 为空时不调用,避免后端 400)
|
|
|
if (memberId) {
|
|
|
api.getReportList(memberId).then(function(res) {
|
|
|
@@ -686,6 +707,13 @@ export default {
|
|
|
.self-test-title { font-size: 28rpx; font-weight: bold; color: #fff; display: block; }
|
|
|
.self-test-sub { font-size: 22rpx; color: rgba(255,255,255,0.8); display: block; margin-top: 4rpx; }
|
|
|
.ai-q-entry { margin: 0 24rpx 16rpx; background: linear-gradient(135deg, #F97316, #F59E0B); border-radius: 20rpx; padding: 24rpx 28rpx; }
|
|
|
+.intent-reminder { margin: 0 24rpx 16rpx; background: #fff; border-radius: 20rpx; padding: 24rpx 28rpx; display: flex; align-items: center; box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06); }
|
|
|
+.intent-reminder:active { opacity: 0.85; }
|
|
|
+.reminder-icon { font-size: 40rpx; margin-right: 16rpx; flex-shrink: 0; }
|
|
|
+.reminder-body { flex: 1; min-width: 0; }
|
|
|
+.reminder-text { font-size: 26rpx; font-weight: 600; color: #333; display: block; }
|
|
|
+.reminder-sub { font-size: 22rpx; color: #999; margin-top: 4rpx; display: block; line-height: 1.4; }
|
|
|
+.reminder-arrow { font-size: 28rpx; color: #F97316; flex-shrink: 0; }
|
|
|
.ai-q-head { display: flex; align-items: center; }
|
|
|
.ai-q-icon { font-size: 40rpx; margin-right: 16rpx; }
|
|
|
.ai-q-info { flex: 1; }
|