chore(ECR-001,ECR-003): 关闭结构对齐并清理 outlook JSON 旧键

正式关闭 ECR-001/002;删除 fortune 双写与 lucky 字段,H5 改读 outlook/boost。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-05 20:39:34 +08:00
co-authored by Cursor
parent 69fa1b85d6
commit 67701d1f7b
22 changed files with 286 additions and 133 deletions
+6 -8
View File
@@ -70,6 +70,7 @@ func BuildWith(opts BuildOpts) (Output, error) {
}
fort := outlook.Build(chart, asOf)
daily := fort.Daily
fortMap := fort.AsMap()
planetsOut := make([]map[string]any, 0, len(chart.Planets))
for _, p := range chart.Planets {
@@ -114,10 +115,8 @@ func BuildWith(opts BuildOpts) (Output, error) {
},
"planets": planetsOut,
"aspects_preview": aspectPreview,
// "fortune" kept for client compat; prefer "outlook" (ECR-002).
"fortune": fort.AsMap(),
"outlook": fort.AsMap(),
"transits": fort.AsMap()["transits"],
"outlook": fortMap,
"transits": fortMap["transits"],
"daily_soft": map[string]any{
"title": daily.Title, "focus": daily.Focus, "tip": daily.Tip,
"energy": daily.Score, "note": daily.Label, "score": daily.Score, "label": daily.Label,
@@ -152,9 +151,9 @@ func BuildWith(opts BuildOpts) (Output, error) {
section("年运详解", fort.Yearly.Tip+" "+fort.Yearly.Caution, []string{
fmt.Sprintf("综合分 %d%s", fort.Yearly.Score, fort.Yearly.Label),
fmt.Sprintf("感情 %d · 事业 %d · 财务 %d · 心情 %d", fort.Yearly.Dims["love"], fort.Yearly.Dims["career"], fort.Yearly.Dims["money"], fort.Yearly.Dims["mood"]),
fort.Yearly.Lucky,
fort.Yearly.Boost,
}),
section("一生运势", fort.Lifetime.Tip, []string{fort.Lifetime.Caution, fort.Lifetime.Lucky}),
section("一生运势", fort.Lifetime.Tip, []string{fort.Lifetime.Caution, fort.Lifetime.Boost}),
section("关系互动", pack.RelationDeep, pack.RelationBullets),
section("事业与学习节奏", pack.CareerDeep, pack.CareerBullets),
section("成长方向", pack.GrowthDeep, pack.GrowthBullets),
@@ -171,8 +170,7 @@ func BuildWith(opts BuildOpts) (Output, error) {
"behavior_pattern": pack.SunDeep,
"relation_style": pack.RelationDeep,
"growth_direction": pack.GrowthDeep,
"fortune_detail": fort.AsMap(), // compat
"outlook_detail": fort.AsMap(),
"outlook_detail": fortMap,
}
return Output{Summary: summary, Detail: detail}, nil
}