fix: 即席查询从登记过的入口续票据,有效必须能进入查询

This commit is contained in:
2026-11-10 09:01:20 +08:00
parent 6140ca3d39
commit e3d7a05e0e
6 changed files with 75 additions and 28 deletions
+4 -3
View File
@@ -313,7 +313,7 @@ async def refresh_accounts() -> None:
continue
valid, user, refreshed = outcome
account.credential_valid = valid
if valid and user is not None:
if user is not None:
account.user_name = user.get("userName") or account.user_name
account.city_name = user.get("cityName") or account.city_name
account.org_name = user.get("orgName") or account.org_name
@@ -326,9 +326,10 @@ async def _touch(cookies: list):
try:
client.import_cookies(cookies)
user = await client.touch_session()
if not await client.renew_ticket():
renewed = await client.renew_ticket()
if not renewed:
logger.info("门户登录仍有效,单点票据没有续上")
return True, user, client.export_cookies()
return renewed, user, client.export_cookies()
except NqiAuthError:
return False, None, cookies
except (NqiError, OSError):