Parcourir la source

refactor(beautify): D20 member-detail 成员详情页清理 (debt 63->0)

- dimensionConfig 六维度色/渐变全部收编 BrandColors.*(含 import)
- navBg 渐变与兜底白同步收编
- brand-colors.js 补 violetLight(#A78BFA)/gold(#FFD700)/orangeDeep(#EA580C)/matGreen(#4CAF50)/matGreenLight(#81C784)
- hex 21->0;P1 4->3
liaoxg il y a 6 jours
Parent
commit
f41f57801a

+ 9 - 8
cfc-frontend/pages/member-detail/member-detail.vue

@@ -106,15 +106,16 @@ import MindSection from '@/pages/member-detail/components/member-detail-sections
 import WisdomSection from '@/pages/member-detail/components/member-detail-sections/wisdom-section.vue'
 import ActionSection from '@/pages/member-detail/components/member-detail-sections/action-section.vue'
 import { getFamilyEnergySandbox, getActivityList, getProductsByDomain, getChildren } from '../../utils/api.js'
+import { BrandColors } from '../../utils/brand-colors.js'
 
 // 维度配置
 var dimensionConfig = {
-  body:     { name: '身体', icon: '\u{1F3C3}', color: '#10B981', gradient: 'linear-gradient(135deg, #4CAF50, #81C784)' },
-  mind:     { name: '心',   icon: '\u2764',    color: '#8B5CF6', gradient: 'linear-gradient(135deg, #8B5CF6, #A78BFA)' },
-  wisdom:   { name: '智',   icon: '\u{1F9E0}', color: '#3B82F6', gradient: 'linear-gradient(135deg, #FFD700, #FFA500)' },
-  action:   { name: '行动', icon: '\u{1F3CB}', color: '#F97316', gradient: 'linear-gradient(135deg, #10B981, #34D399)' },
-  wealth:   { name: '富',   icon: '\u{1F4B0}', color: '#F59E0B', gradient: 'linear-gradient(135deg, #F59E0B, #FBBF24)' },
-  home:     { name: '全家', icon: '\u{1F3E0}', color: '#F97316', gradient: 'linear-gradient(135deg, #F97316, #EA580C)' }
+  body:     { name: '身体', icon: '\u{1F3C3}', color: BrandColors.success,    gradient: 'linear-gradient(135deg, ' + BrandColors.matGreen + ', ' + BrandColors.matGreenLight + ')' },
+  mind:     { name: '心',   icon: '\u2764',    color: BrandColors.violet,     gradient: 'linear-gradient(135deg, ' + BrandColors.violet + ', ' + BrandColors.violetLight + ')' },
+  wisdom:   { name: '智',   icon: '\u{1F9E0}', color: BrandColors.infoBlue,   gradient: 'linear-gradient(135deg, ' + BrandColors.gold + ', ' + BrandColors.goldDeep + ')' },
+  action:   { name: '行动', icon: '\u{1F3CB}', color: BrandColors.primary,    gradient: 'linear-gradient(135deg, ' + BrandColors.success + ', ' + BrandColors.successLight3 + ')' },
+  wealth:   { name: '富',   icon: '\u{1F4B0}', color: BrandColors.wealth,     gradient: 'linear-gradient(135deg, ' + BrandColors.wealth + ', ' + BrandColors.warning + ')' },
+  home:     { name: '全家', icon: '\u{1F3E0}', color: BrandColors.primary,    gradient: 'linear-gradient(135deg, ' + BrandColors.primary + ', ' + BrandColors.orangeDeep + ')' }
 }
 
 export default {
@@ -151,9 +152,9 @@ export default {
     },
     navBg: function() {
       if (this.entrySource === 'body-card') {
-        return 'linear-gradient(135deg, #FFD700, #FFA500)'
+        return 'linear-gradient(135deg, ' + BrandColors.gold + ', ' + BrandColors.goldDeep + ')'
       }
-      return '#FFFFFF'
+      return BrandColors.white
     },
     avatarGradient: function() {
       return this.config.gradient

+ 5 - 0
cfc-frontend/utils/brand-colors.js

@@ -96,6 +96,11 @@ export const BrandColors = {
 
   // 语义别名(后端配置色兜底;SCSS 侧等值令牌见 uni.scss $facade-violet/$status-info)
   violet: '#8B5CF6',      // violet-500 紫罗兰(心智维度组件色板)
+  violetLight: '#A78BFA', // violet-400 紫罗兰浅档(渐变起)
+  gold: '#FFD700',        // 亮金(智慧维度渐变起)
+  orangeDeep: '#EA580C',  // orange-600 橙深档(全家渐变终)
+  matGreen: '#4CAF50',    // Material green-500
+  matGreenLight: '#81C784', // Material green-300
   infoBlue: '#3B82F6',    // blue-500 信息蓝(智慧维度组件色板)
 
   // 通用语义别名(方便使用)