|
|
@@ -67,6 +67,26 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 画像推荐 -->
|
|
|
+ <view class="section rec-section" v-if="recommendations.length > 0 && !recLoading">
|
|
|
+ <view class="section-header">
|
|
|
+ <text class="section-title">🎯 为你推荐</text>
|
|
|
+ <text class="section-sub">基于你的心理画像智能匹配</text>
|
|
|
+ </view>
|
|
|
+ <view class="rec-list">
|
|
|
+ <view class="rec-card" v-for="(item, idx) in recommendations" :key="idx" @click="goRecDetail(item)">
|
|
|
+ <view class="rec-card-left">
|
|
|
+ <text class="rec-card-icon">{{ item.type === 'article' ? '📖' : (item.type === 'activity' ? '🎯' : '🛒') }}</text>
|
|
|
+ <view class="rec-card-info">
|
|
|
+ <text class="rec-card-title">{{ item.title }}</text>
|
|
|
+ <text class="rec-card-desc">{{ item.summary || item.reason }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <text class="rec-card-score">⭐ {{ Math.round(item.recommendScore) }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 加载中 -->
|
|
|
<view class="loading-state" v-if="loading">
|
|
|
<text class="loading-text">加载中...</text>
|
|
|
@@ -84,7 +104,7 @@
|
|
|
|
|
|
<script>
|
|
|
import PageBanner from '../../components/PageBanner.vue'
|
|
|
-import { getEmiReport } from '../../utils/api.js'
|
|
|
+import { getEmiReport, getProfileRecommend } from '../../utils/api.js'
|
|
|
|
|
|
export default {
|
|
|
components: { PageBanner },
|
|
|
@@ -93,6 +113,8 @@ export default {
|
|
|
memberId: null,
|
|
|
report: null,
|
|
|
loading: true,
|
|
|
+ recommendations: [],
|
|
|
+ recLoading: false,
|
|
|
dimensions: [
|
|
|
{ key: 'emotionStability', label: '情绪稳定性', icon: '\u{1F9E0}', color: '#FF6B35', desc: '情绪调节的综合能力(含自卑-自信、抑郁-愉悦、焦虑-安详、无力感-掌控感四个隐性指标)' }
|
|
|
]
|