Commit 5afcd35e by baiquan

fix(service): 修改登录验证逻辑- 将 check_result 初始值改为 True

- 反转了登录验证的条件判断,确保逻辑一致性
- 优化了代码结构,提高了可读性
parent 8e2f8dae
......@@ -145,13 +145,13 @@ def listen_login(tab):
raise AppError("登录失败-->未获取到登录数据")
def listen_check_login(tab):
check_result = False
check_result = True
for packet in tab.listen.steps(timeout=5):
if '/aff/check_login' in packet.url and packet.response.body:
login_res = packet.response.body
logger.info(f'获取确认登录数据:{login_res}')
if login_res['description'] == '' and login_res['deputy_has_login'] == True and login_res['error_code'] == 0 :
check_result = True
if login_res['description'] != '' or login_res['deputy_has_login'] != True and login_res['error_code'] != 0 :
check_result = False
return check_result
def verify_captcha(tab):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment