From 0aacb0d96b2c72bf9380858373d105f0dbf7334f Mon Sep 17 00:00:00 2001 From: H Vs Date: Wed, 19 Feb 2025 17:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4uuid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wechat/biz.py | 5 +++++ wechat/gewe_chat.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wechat/biz.py b/wechat/biz.py index de10924..3b3ad3f 100644 --- a/wechat/biz.py +++ b/wechat/biz.py @@ -298,6 +298,11 @@ def login_or_reconnect(wxchat:gewe_chat.GeWeChatCom, token_id, app_id, region_id qr_code = wxchat.get_login_qr_code(token_id, app_id,region_id) base64_string = qr_code.get('qrImgBase64') uuid = qr_code.get('uuid') + if not uuid: + logger.error(f"uuid获取二维码失败: {qr_code}") + break + + app_id = app_id or qr_code.get('appId') start_time = time.time() diff --git a/wechat/gewe_chat.py b/wechat/gewe_chat.py index 2ecde0e..b3984b2 100644 --- a/wechat/gewe_chat.py +++ b/wechat/gewe_chat.py @@ -918,7 +918,7 @@ class GeWeChatCom: def save_login_wx_captch_code_to_cache(self,token_id,captch_code): hash_key = f"__AI_OPS_WX__:WXCAPTCHCODE:{token_id}" - redis_helper.redis_helper.set_hash(hash_key,{"data":captch_code},10) + redis_helper.redis_helper.set_hash(hash_key,{"data":captch_code},15) def get_login_wx_captch_code_to_cache(self,token_id)->str: hash_key = f"__AI_OPS_WX__:WXCAPTCHCODE:{token_id}"