feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点
落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,7 +30,6 @@ func Build(birth time.Time, displayName string) Output {
|
||||
bz := getBazi(y, int(m), d, 12)
|
||||
pct := calc5E(bz)
|
||||
strong := strongestEl(pct)
|
||||
weak := weakestEl(pct)
|
||||
cst := constitutionByElement[strong]
|
||||
emo := emotionByElement[strong]
|
||||
|
||||
@@ -68,16 +67,7 @@ func Build(birth time.Time, displayName string) Output {
|
||||
"lock_teaser_wuxing": "体质特征、调养要点、易感倾向、食疗与作息节律,解锁后查看完整方案。",
|
||||
"pattern_key": main,
|
||||
"pyramid": tri.PyramidMap(),
|
||||
"wuxing": map[string]any{
|
||||
"bars": wuxingBars(pct),
|
||||
"primary": cst.Primary,
|
||||
"strong": cst.Strong,
|
||||
"weak": cst.Weak,
|
||||
"strong_el": strong,
|
||||
"weak_el": weak,
|
||||
"emotion": emo.Strength,
|
||||
"care_dir": "养" + cst.Strong + " · 需呵护" + cst.Weak,
|
||||
},
|
||||
"wuxing": WuxingBlock(birth),
|
||||
"today_tip": tip,
|
||||
"dimensions": dims,
|
||||
"strengths_preview": []string{
|
||||
|
||||
@@ -115,6 +115,27 @@ func wuxingBars(p map[string]int) []map[string]any {
|
||||
return bars
|
||||
}
|
||||
|
||||
// WuxingBlock builds the shared 五行 summary block (bars + tendency labels).
|
||||
func WuxingBlock(birth time.Time) map[string]any {
|
||||
y, m, d := birth.Date()
|
||||
bz := getBazi(y, int(m), d, 12)
|
||||
pct := calc5E(bz)
|
||||
strong := strongestEl(pct)
|
||||
weak := weakestEl(pct)
|
||||
cst := constitutionByElement[strong]
|
||||
emo := emotionByElement[strong]
|
||||
return map[string]any{
|
||||
"bars": wuxingBars(pct),
|
||||
"primary": cst.Primary,
|
||||
"strong": cst.Strong,
|
||||
"weak": cst.Weak,
|
||||
"strong_el": strong,
|
||||
"weak_el": weak,
|
||||
"emotion": emo.Strength,
|
||||
"care_dir": "养" + cst.Strong + " · 需呵护" + cst.Weak,
|
||||
}
|
||||
}
|
||||
|
||||
func todayTip(now time.Time) map[string]any {
|
||||
st := companion.TodaySolar(now)
|
||||
el := seasonEl[int(now.Month())-1]
|
||||
|
||||
Reference in New Issue
Block a user