From 9c5c18fb658560aab69013f2cf83d78ae61a006b Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Wed, 11 Mar 2026 14:50:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E6=97=B6=E8=A1=A5=E5=85=85=20main=5Ftitle=20=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=20errcode=2041016?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 企微更新模板卡片接口要求包含 main_title,否则报 missing title 错误。 Co-Authored-By: Claude Opus 4.6 --- app/services/wechat_service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/services/wechat_service.py b/app/services/wechat_service.py index 8a7559a..00aa797 100644 --- a/app/services/wechat_service.py +++ b/app/services/wechat_service.py @@ -228,6 +228,10 @@ class WeChatService: "template_card": { "card_type": "button_interaction", "task_id": alarm_id, + "main_title": { + "title": replace_text, + }, + "sub_title_text": f"操作人:{operator_name}", "button_list": [ { "text": replace_text,