[patch] 设计PDD的处理消息架构为msg_type 通用模式 处理PDD支持图片类型和 商品卡片类型的消息的发送回复 修改GUI托盘内部样式

This commit is contained in:
2025-10-21 14:20:19 +08:00
parent f7606f09cf
commit 9b21287bd0
4 changed files with 375 additions and 31 deletions

View File

@@ -614,9 +614,9 @@ class FixJdCookie:
try:
while not stop_event.is_set(): # 检查是否收到中止信号
try:
print(f"等待监听消息-{datetime.now()}")
print(f"[JD]等待监听消息-{datetime.now()}")
response = await asyncio.wait_for(ws.recv(), timeout=1)
print(f"原始消息类型:{type(response)}, 消息体为: {response}")
print(f"[JD]原始消息类型:{type(response)}, 消息体为: {response}")
# 🔧 修复:检测被踢下线消息
json_resp = json.loads(response) if isinstance(response, (str, bytes)) else response
@@ -654,10 +654,10 @@ class FixJdCookie:
await self.process_incoming_message(response, ws, aid, pin_zj, vender_id, store)
print(json_resp)
# print(json_resp) 暂去解析后消息结构
ver = json_resp.get("ver")
print(f"版本{ver}")
print(f"[jd]信息编码版本号:{ver}")
except asyncio.TimeoutError:
continue
except websockets.ConnectionClosed: