Browse Source

fix(mp): 沙盘五角两字解读(大爱/根基/未来/创富/和谐)+位置微调—心再上移一字高/行左移一字宽/身右移一字宽

Agnes Agent 39 minutes ago
parent
commit
f10a6efd36
1 changed files with 19 additions and 8 deletions
  1. 19 8
      cfc-frontend/components/wuxing-sandbox.vue

+ 19 - 8
cfc-frontend/components/wuxing-sandbox.vue

@@ -217,6 +217,17 @@ var DIM_META = {
   action: { name: '行', element: '木' }
 }
 
+/** 五角标签固定两字解读(用户 2026-12-06 定稿):
+ *  词源 = tab-transition.vue DIM_MAP 品牌四字标签的语义两字(大爱传承→大爱、根基永因→根基、
+ *  面向未来→未来、利他创富→创富、人际和谐→和谐)。保证五角一律两字,不随 API 名称截取漂移。 */
+var DIM_LABEL = {
+  mind:   '大爱',
+  body:   '根基',
+  wisdom: '未来',
+  wealth: '创富',
+  action: '和谐'
+}
+
 export default {
   props: {
     /** 模式:'preview' 引导条 / 'live' 真实数据 */
@@ -441,10 +452,10 @@ export default {
         var reg = regMeta[code] || {}
         var meta = DIM_META[code] || {}
         var score = scoreByCode[code] || 0
-        // 五角标签按用户要求只显示名称后两字(如"身体健康"→"健康");
-        // name 保留全文供读屏 starAriaLabel / 底部维度条使用,避免截断丢失信息。
+        // 五角标签统一为固定两字解读(用户 2026-12-06):心=大爱/身=根基/智=未来/富=创富/行=和谐,
+        // 词源见 DIM_LABEL 注释;不随 API 名称截取漂移。name 保留全文供读屏 starAriaLabel / 底部维度条。
         var fullName = d.name || reg.name || meta.name || ''
-        var shortName = fullName ? fullName.slice(-2) : ''
+        var shortName = DIM_LABEL[code] || (fullName ? fullName.slice(-2) : '')
         all.push({
           code: code,
           name: fullName,
@@ -960,11 +971,11 @@ export default {
 .star-point--right { top: 40%; left: 95%; }
 .star-point--lr { top: 88%; left: 84%; }
 .star-point--ll { top: 88%; left: 16%; }
-/* 五角微调(用户 2026-12-05 反馈):心位「大爱」连图标上移一个字高(22rpx);
-   行位「和谐」连图标右移两个字宽(48rpx);身位「根基」连图标左移两个字宽(48rpx) */
-.star-point--mind { transform: translate(-50%, calc(-50% - 22rpx)); }
-.star-point--action { left: calc(5% + 48rpx); }
-.star-point--body { left: calc(95% - 48rpx); }
+/* 五角微调(用户 2026-12-06 反馈):心位「大爱」再上移一个字高(累计 -44rpx);
+   行位「和谐」左移一个字宽(右移 48→26rpx);身位「根基」右移一个字宽(左移 48→26rpx) */
+.star-point--mind { transform: translate(-50%, calc(-50% - 44rpx)); }
+.star-point--action { left: calc(5% + 26rpx); }
+.star-point--body { left: calc(95% - 26rpx); }
 
 .point-dot {
   width: 60rpx; height: 60rpx; border-radius: 50%;