|
@@ -39,6 +39,7 @@
|
|
|
:members="familyMembersVisible"
|
|
:members="familyMembersVisible"
|
|
|
:energyMap="energyMapForGraph"
|
|
:energyMap="energyMapForGraph"
|
|
|
:intimacyMap="intimacyMapForGraph"
|
|
:intimacyMap="intimacyMapForGraph"
|
|
|
|
|
+ :compatibilityMap="compatibilityMapForGraph"
|
|
|
@memberTap="goMemberDetail" />
|
|
@memberTap="goMemberDetail" />
|
|
|
|
|
|
|
|
<!-- 登录后:用户快捷入口 -->
|
|
<!-- 登录后:用户快捷入口 -->
|
|
@@ -231,9 +232,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- 查看完整传统文化入口 -->
|
|
|
|
|
- <view class="culture-card" style="text-align:center; padding:16rpx;" @click="onFuncClick({needLogin:true, page:'/pages/mind/traditional-mirror'})">
|
|
|
|
|
- <text style="font-size:24rpx; color:#8B5CF6;">查看完整解读 →</text>
|
|
|
|
|
|
|
+ <!-- 查看家庭天盘入口 -->
|
|
|
|
|
+ <view class="culture-card" style="text-align:center; padding:16rpx;" @click="onFuncClick({needLogin:true, page:'/pages/mind-detail/family-dashboard'})">
|
|
|
|
|
+ <text style="font-size:24rpx; color:#8B5CF6;">查看家庭天盘 →</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -333,7 +334,7 @@ export default {
|
|
|
{ icon: '\u{2728}', label: '情绪打卡', needLogin: true, page: '/pages/mind-detail/emotion-checkin' },
|
|
{ icon: '\u{2728}', label: '情绪打卡', needLogin: true, page: '/pages/mind-detail/emotion-checkin' },
|
|
|
{ icon: '\u{1F4C8}', label: '情绪趋势', needLogin: true, page: '/pages/mind-detail/emotion-trend' },
|
|
{ icon: '\u{1F4C8}', label: '情绪趋势', needLogin: true, page: '/pages/mind-detail/emotion-trend' },
|
|
|
{ icon: '\u{1F9E9}', label: '心理自评', needLogin: true, page: '/pages/mind-detail/screening' },
|
|
{ icon: '\u{1F9E9}', label: '心理自评', needLogin: true, page: '/pages/mind-detail/screening' },
|
|
|
- { icon: '\u{2637}', label: '传统文化', needLogin: true, page: '/pages/mind-detail/traditional-mirror' },
|
|
|
|
|
|
|
+ { icon: '\u{1F3E0}', label: '家庭天盘', needLogin: true, page: '/pages/mind-detail/family-dashboard' },
|
|
|
{ icon: '\u{1F9D8}', label: '疏导工具', needLogin: true, page: '/pages/mind-detail/soothe-toolbox' }
|
|
{ icon: '\u{1F9D8}', label: '疏导工具', needLogin: true, page: '/pages/mind-detail/soothe-toolbox' }
|
|
|
],
|
|
],
|
|
|
articles: [],
|
|
articles: [],
|
|
@@ -345,6 +346,7 @@ export default {
|
|
|
// 传统文化数据
|
|
// 传统文化数据
|
|
|
traditionalData: null,
|
|
traditionalData: null,
|
|
|
traditionalLoading: true,
|
|
traditionalLoading: true,
|
|
|
|
|
+ compatibilityData: null,
|
|
|
wuxingConfig: {
|
|
wuxingConfig: {
|
|
|
wood: { label: '木', color: '#10B981' },
|
|
wood: { label: '木', color: '#10B981' },
|
|
|
fire: { label: '火', color: '#FF6B9D' },
|
|
fire: { label: '火', color: '#FF6B9D' },
|
|
@@ -392,6 +394,17 @@ export default {
|
|
|
intimacyMapForGraph: function() {
|
|
intimacyMapForGraph: function() {
|
|
|
return {}
|
|
return {}
|
|
|
},
|
|
},
|
|
|
|
|
+ compatibilityMapForGraph: function() {
|
|
|
|
|
+ var map = {}
|
|
|
|
|
+ if (this.compatibilityData && this.compatibilityData.relationships) {
|
|
|
|
|
+ for (var i = 0; i < this.compatibilityData.relationships.length; i++) {
|
|
|
|
|
+ var r = this.compatibilityData.relationships[i]
|
|
|
|
|
+ var key = r.memberId1 < r.memberId2 ? r.memberId1 + '-' + r.memberId2 : r.memberId2 + '-' + r.memberId1
|
|
|
|
|
+ map[key] = { overallScore: r.overallScore }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return map
|
|
|
|
|
+ },
|
|
|
emotionArticles: function() {
|
|
emotionArticles: function() {
|
|
|
if (!this.articles || this.articles.length === 0) return []
|
|
if (!this.articles || this.articles.length === 0) return []
|
|
|
var result = []
|
|
var result = []
|
|
@@ -655,6 +668,9 @@ export default {
|
|
|
this.loadDimensionTasks()
|
|
this.loadDimensionTasks()
|
|
|
this.loadDimensionActivities()
|
|
this.loadDimensionActivities()
|
|
|
this.loadDimensionProducts()
|
|
this.loadDimensionProducts()
|
|
|
|
|
+ if (this.familyMembersVisible.length > 0) {
|
|
|
|
|
+ this.loadCompatibilityData()
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
loadSandboxData: function() {
|
|
loadSandboxData: function() {
|
|
|
var self = this
|
|
var self = this
|
|
@@ -727,6 +743,28 @@ export default {
|
|
|
self.familyMembersVisible = []
|
|
self.familyMembersVisible = []
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ loadCompatibilityData: function() {
|
|
|
|
|
+ var self = this
|
|
|
|
|
+ var familyId = uni.getStorageSync('currentFamilyId')
|
|
|
|
|
+ if (!familyId) {
|
|
|
|
|
+ var userInfo = uni.getStorageSync('userInfo')
|
|
|
|
|
+ if (userInfo && userInfo.familyId) familyId = userInfo.familyId
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!familyId) return
|
|
|
|
|
+ var token = uni.getStorageSync('token')
|
|
|
|
|
+ uni.request({
|
|
|
|
|
+ url: config.API_BASE_URL + '/api/mind/traditional/family-dashboard',
|
|
|
|
|
+ method: 'POST',
|
|
|
|
|
+ header: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
|
|
|
|
|
+ data: { familyId: familyId },
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.data && res.data.code === 200 && res.data.data) {
|
|
|
|
|
+ self.compatibilityData = res.data.data
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ fail: function() {}
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
scrollToSection: function(section) {
|
|
scrollToSection: function(section) {
|
|
|
uni.pageScrollTo({ selector: '#' + section, duration: 300 })
|
|
uni.pageScrollTo({ selector: '#' + section, duration: 300 })
|
|
|
},
|
|
},
|
|
@@ -750,8 +788,9 @@ export default {
|
|
|
goTasks: function() { uni.switchTab({ url: '/pages/tasks/tasks' }) },
|
|
goTasks: function() { uni.switchTab({ url: '/pages/tasks/tasks' }) },
|
|
|
goMemberDetail: function(member) {
|
|
goMemberDetail: function(member) {
|
|
|
if (!member || !member.memberId) return
|
|
if (!member || !member.memberId) return
|
|
|
|
|
+ var currentId = this.currentChildId
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: '/pages/mind-detail/member-mind-detail?childId=' + member.memberId
|
|
|
|
|
|
|
+ url: '/pages/mind-detail/duo-compatibility?memberId1=' + currentId + '&memberId2=' + member.memberId
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|