This commit is contained in:
Mrx
2026-05-22 11:28:44 +08:00
parent d818a0a1c7
commit effe82ce65

View File

@@ -3169,7 +3169,16 @@ func (s *ToolboxService) processJieQi(
} }
} }
// 6. 公历 / 农历字段可读化(可选) // 6. 字段映射与公历/农历字段可读化
// 将 name 映射为 word前端期望
if name, ok := clean["name"].(string); ok {
clean["word"] = name
}
// 将 jieshao 映射为 content前端期望
if desc, ok := clean["jieshao"].(string); ok {
clean["content"] = desc
}
// 公历 / 农历字段可读化
if date, ok := clean["date"].(map[string]interface{}); ok { if date, ok := clean["date"].(map[string]interface{}); ok {
clean["greg_date"] = date["gregdate"] clean["greg_date"] = date["gregdate"]
clean["lunar_date"] = date["lunardate"] clean["lunar_date"] = date["lunardate"]