|
|
@@ -76,9 +76,9 @@
|
|
|
:avg-scores="radarFamilyScores"
|
|
|
:population-scores="[]"
|
|
|
fillColor="rgba(102,126,234,0.2)"
|
|
|
- strokeColor="#F97316"
|
|
|
+ :stroke-color="radarStrokeColor"
|
|
|
gridColor="rgba(102,126,234,0.15)"
|
|
|
- labelColor="#888"
|
|
|
+ :label-color="radarLabelColor"
|
|
|
:width="580"
|
|
|
:height="580"
|
|
|
@dimensionClick="goDimension" />
|
|
|
@@ -142,13 +142,14 @@
|
|
|
<script>
|
|
|
import RadarChart from '../../components/RadarChart.vue'
|
|
|
import { getFamilyEnergySandbox, getFamilyMemberList } from '../../utils/api.js'
|
|
|
+import { BrandColors } from '../../utils/brand-colors.js'
|
|
|
|
|
|
var DIM_CONFIG = [
|
|
|
- { code: 'body', label: '身', icon: '💪', color: 'BrandColors.success', gradient: 'linear-gradient(135deg,#10B981,#34D399)' },
|
|
|
- { code: 'mind', label: '心', icon: '❤️', color: 'BrandColors.primary', gradient: 'linear-gradient(135deg,#F97316,#FB923C)' },
|
|
|
- { code: 'wisdom', label: '智', icon: '🧠', color: '#F59E0B', gradient: 'linear-gradient(135deg,#F59E0B,#FBBF24)' },
|
|
|
- { code: 'action', label: '行', icon: '⚡', color: 'BrandColors.primary', gradient: 'linear-gradient(135deg,#F97316,#FB923C)' },
|
|
|
- { code: 'wealth', label: '富', icon: '💎', color: '#3B82F6', gradient: 'linear-gradient(135deg,#3B82F6,#60A5FA)' }
|
|
|
+ { code: 'body', label: '身', icon: '💪', color: BrandColors.success, gradient: `linear-gradient(135deg,${BrandColors.success},${BrandColors.successLight3})` },
|
|
|
+ { code: 'mind', label: '心', icon: '❤️', color: BrandColors.primary, gradient: `linear-gradient(135deg,${BrandColors.primary},${BrandColors.primaryLight})` },
|
|
|
+ { code: 'wisdom', label: '智', icon: '🧠', color: BrandColors.wealth, gradient: `linear-gradient(135deg,${BrandColors.wealth},${BrandColors.warning})` },
|
|
|
+ { code: 'action', label: '行', icon: '⚡', color: BrandColors.primary, gradient: `linear-gradient(135deg,${BrandColors.primary},${BrandColors.primaryLight})` },
|
|
|
+ { code: 'wealth', label: '富', icon: '💎', color: BrandColors.infoBlue, gradient: `linear-gradient(135deg,${BrandColors.infoBlue},${BrandColors.infoBlueLight})` }
|
|
|
]
|
|
|
|
|
|
export default {
|
|
|
@@ -162,6 +163,8 @@ export default {
|
|
|
familyMembers: [],
|
|
|
selectedMemberId: null,
|
|
|
currentView: 'self', // self | family
|
|
|
+ radarStrokeColor: BrandColors.primary, // 雷达描边(品牌橙)
|
|
|
+ radarLabelColor: BrandColors.textFaint // 雷达标签(中灰)
|
|
|
showMemberPicker: false
|
|
|
}
|
|
|
},
|
|
|
@@ -202,9 +205,9 @@ export default {
|
|
|
return '👤'
|
|
|
},
|
|
|
avatarGradient() {
|
|
|
- if (this.currentView === 'family') return 'linear-gradient(135deg,#F97316,#FB923C)'
|
|
|
+ if (this.currentView === 'family') return `linear-gradient(135deg,${BrandColors.primary},${BrandColors.primaryLight})`
|
|
|
if (this.currentMember) return this.memberColor(this.currentMember)
|
|
|
- return 'linear-gradient(135deg,#F97316,#FB923C)'
|
|
|
+ return `linear-gradient(135deg,${BrandColors.primary},${BrandColors.primaryLight})`
|
|
|
},
|
|
|
navTitle() { return this.currentMemberName + ' · 五维能量' },
|
|
|
currentMemberIcon() {
|
|
|
@@ -218,12 +221,12 @@ export default {
|
|
|
return this.currentMember.name || '我的'
|
|
|
},
|
|
|
navGradient() {
|
|
|
- if (this.currentView === 'family') return 'linear-gradient(135deg,#F97316,#FB923C)'
|
|
|
+ if (this.currentView === 'family') return `linear-gradient(135deg,${BrandColors.primary},${BrandColors.primaryLight})`
|
|
|
if (this.currentMember) {
|
|
|
var dim = DIM_CONFIG[0]
|
|
|
return dim.gradient
|
|
|
}
|
|
|
- return 'linear-gradient(135deg,#F97316,#FB923C)'
|
|
|
+ return `linear-gradient(135deg,${BrandColors.primary},${BrandColors.primaryLight})`
|
|
|
},
|
|
|
pageTitle() { return this.navTitle },
|
|
|
radarDims() {
|
|
|
@@ -277,13 +280,13 @@ export default {
|
|
|
uni.navigateBack({ fail: function() { uni.switchTab({ url: '/pages/index-home/index' }) } })
|
|
|
},
|
|
|
memberColor(member) {
|
|
|
- if (!member) return 'linear-gradient(135deg,#F97316,#FB923C)'
|
|
|
- var types = { parent: '#F59E0B', child: 'BrandColors.success', teacher: '#3B82F6' }
|
|
|
+ if (!member) return `linear-gradient(135deg,${BrandColors.primary},${BrandColors.primaryLight})`
|
|
|
+ var types = { parent: BrandColors.wealth, child: BrandColors.success, teacher: BrandColors.infoBlue }
|
|
|
var t = member.memberType || 'parent'
|
|
|
var colors = {
|
|
|
- parent: 'linear-gradient(135deg,#F59E0B,#FBBF24)',
|
|
|
- child: 'linear-gradient(135deg,#10B981,#34D399)',
|
|
|
- teacher:'linear-gradient(135deg,#3B82F6,#60A5FA)'
|
|
|
+ parent: `linear-gradient(135deg,${BrandColors.wealth},${BrandColors.warning})`,
|
|
|
+ child: `linear-gradient(135deg,${BrandColors.success},${BrandColors.successLight3})`,
|
|
|
+ teacher:`linear-gradient(135deg,${BrandColors.infoBlue},${BrandColors.infoBlueLight})`
|
|
|
}
|
|
|
return colors[t] || colors.parent
|
|
|
},
|
|
|
@@ -418,9 +421,13 @@ export default {
|
|
|
import { primary, success } from '@/utils/brand-colors.js'
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+// ===== 能量页专属色阶(导航/卡面深海军蓝,单页专用;约定见 uni.scss §14)=====
|
|
|
+$c-energy-deep-1: #0F1B2D; // 导航渐变起(深夜蓝)
|
|
|
+$c-energy-deep-2: #1A2744; // 导航渐变终 / 卡片底(藏蓝)
|
|
|
+
|
|
|
.container {
|
|
|
min-height: 100vh;
|
|
|
- background: linear-gradient(180deg, #0F1B2D 0%, #1A2744 100%);
|
|
|
+ background: linear-gradient(180deg, $c-energy-deep-1 0%, $c-energy-deep-2 100%);
|
|
|
padding-bottom: 40rpx;
|
|
|
}
|
|
|
.nav-bar {
|
|
|
@@ -686,7 +693,7 @@ import { primary, success } from '@/utils/brand-colors.js'
|
|
|
}
|
|
|
.member-picker {
|
|
|
width: 100%;
|
|
|
- background: #1A2744;
|
|
|
+ background: $c-energy-deep-2;
|
|
|
border-radius: 32rpx 32rpx 0 0;
|
|
|
padding: 20rpx 30rpx 60rpx;
|
|
|
max-height: 70vh;
|