瀏覽代碼

扫码验证wxid

develop
H Vs 1 月之前
父節點
當前提交
23457b22c3
共有 1 個檔案被更改,包括 10 行新增0 行删除
  1. +10
    -0
      resources/login_resources.py

+ 10
- 0
resources/login_resources.py 查看文件

@@ -133,6 +133,16 @@ def waitting_login_result(wxchat:gewe_chat.GeWeChatCom, token_id, app_id,region_

wxid=login_info.get('wxid',agent_tel)

cache_login_info=wxchat.get_login_info_from_cache(agent_tel)
cache_wxid=cache_login_info.get('wxid','')
if not cache_login_info and cache_wxid!=wxid:
logger.warning(f"agent_tel {agent_tel} , wxid {wxid} 与 cache_wxid {cache_wxid} 不匹配,登录失败")
wxchat.logout(token_id,app_id)
# k_message=utils.login_result_message(token_id,agent_tel,region_id,agent_token_id,'')
# kafka_helper.kafka_client.produce_message(k_message)
break

login_info.update({'appId': app_id, 'uuid': uuid, 'tokenId': token_id,'status': 1,'headImgUrl':head_img_url,'regionId':region_id})
cache_login_info=redis_helper.redis_helper.get_hash(hash_key)


Loading…
取消
儲存