Skip to content

Conversation

@GreenTeodoro839
Copy link

@GreenTeodoro839 GreenTeodoro839 commented Feb 10, 2026

#1
基本的登录、登出功能都正常了(logout_all登出所有设备还不能用),OCR模型已经重新针对新的验证码进行训练。
验证码数据集,解压密码NJU

1. urls.py

用途 旧 URL 新 URL
获取二维码 UUID /qrCode/get?ts=%d /qrCode/getToken?ts=%d
二维码图片 /qrCode/code?uuid=%s /qrCode/getCode?uuid=%s
轮询扫码状态 /qrCode/status?ts=%d&uuid=%s /qrCode/getStatus.htl?ts=%d
获取验证码 /captcha.html?ts=%d /getCaptcha.htl?%d
检查是否需要验证码 /checkNeedCaptcha.htl(新增)

2. pwdLogin.py(密码登录)

  • 加密盐获取:从 inline JS 变量 pwdDefaultEncryptSalt 改为 hidden input #pwdEncryptSalt
  • 验证码:登录前先调 checkNeedCaptcha.htl 判断是否需要验证码,不需要时跳过
  • 表单字段名captchaResponsecaptcha
  • 表单取值xpath[0] 硬编码改为 get_field() 容错
  • 错误信息:验证码错误文案新增匹配 "图形动态码错误",错误提取增加回退 xpath

3. QRlogin.py(二维码登录)

  • 获取 UUID:新接口需要传 params={"uuid": ""} 参数
  • 轮询状态:uuid 从 URL 拼接改为 data 参数传递
  • 状态码:新增 3(二维码失效)
  • 表单字段:新增 cllt: "qrLogin"dllt 改为从页面取值(generalLogin),取值方式改为 get_field() 容错

4. base.py(登录状态判断)

平台升级后,已登录用户访问 index.do 会被重定向到 /personalInfo/personCenter/index.html,而不是停留在 index.do。未登录用户则会被重定向到登录页 /authserver/login
修复方式:将"URL 等于 index"改为"URL 不是登录页"。

@GreenTeodoro839 GreenTeodoro839 marked this pull request as draft February 10, 2026 13:37
@GreenTeodoro839 GreenTeodoro839 marked this pull request as ready for review February 10, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant