Revert "fix: 优化登录项"

This reverts commit 3b3fac1cee.
This commit is contained in:
Daniel
2026-03-16 23:05:07 +08:00
parent 1a339d82cd
commit d5f1b2ae77
6 changed files with 8 additions and 316 deletions

View File

@@ -1094,32 +1094,6 @@ async def api_slider_verify_post(body: SliderVerifyBody):
raise HTTPException(status_code=502, detail=f"slider_upstream_error: {e}") from e
class VerifyCodeBody(BaseModel):
"""iPad 登录验证码7006 /login/VerifyCode 入参。"""
code: str = ""
data62: str = ""
ticket: str = ""
@app.post("/api/verify-code")
async def api_verify_code(key: str = Query(..., description="账号 key"), body: VerifyCodeBody = None):
"""iPad 登录验证码验证:转发到 7006 POST /login/VerifyCode?key=xxxbody 为 code、data62、ticket。"""
if body is None:
body = VerifyCodeBody()
url = f"{CHECK_STATUS_BASE_URL.rstrip('/')}/login/VerifyCode"
payload = {"code": (body.code or "").strip(), "data62": (body.data62 or "").strip(), "ticket": (body.ticket or "").strip()}
try:
async with httpx.AsyncClient(trust_env=False, timeout=30.0) as client:
resp = await client.post(url, params={"key": key}, json=payload)
try:
return resp.json()
except Exception:
return {"ok": resp.status_code == 200, "status_code": resp.status_code, "text": (resp.text or "")[:500]}
except Exception as e:
logger.warning("VerifyCode upstream error: %s", e)
raise HTTPException(status_code=502, detail=f"verify_code_upstream_error: {e}") from e
# ---------- R1-2 客户画像 / R1-3 定时问候 / R1-4 分群推送 / 消息与发送 ----------
class CustomerCreate(BaseModel):