diff --git a/app/services/wechat_service.py b/app/services/wechat_service.py index cfa10b1..577ba91 100644 --- a/app/services/wechat_service.py +++ b/app/services/wechat_service.py @@ -8,6 +8,7 @@ - 卡片更新:按钮点击后更新卡片状态 """ +import asyncio import httpx import time from typing import Optional, List, Dict @@ -615,6 +616,9 @@ class WeChatService: if not sent: success = False logger.warning(f"群聊截图发送失败: alarm={alarm_id}") + else: + # 等待企微完成图片投递,避免后续文字消息先于图片到达 + await asyncio.sleep(1) else: logger.warning(f"截图上传企微失败,跳过图片消息: alarm={alarm_id}")