fix: 平台登录默认显示验证码,管理员跳过验证码

This commit is contained in:
2026-10-30 12:06:46 +08:00
parent 2e8c67f0a4
commit 559548d577
3 changed files with 37 additions and 20 deletions
+2
View File
@@ -117,6 +117,8 @@ async def login(body: dict) -> dict:
mode = _setting(session).login_mode
if mode != "nqi":
raise _bad("账号或密码不正确")
if str(body.get("sessionId") or ""):
return await nqi_finish(body)
started = await nqi_start({"username": username, "purpose": "login"})
if started.get("status") == "captcha":
return {**started, "status": "need_captcha"}