feat: 学习进度轮询、学时依据与首页代理弹窗

This commit is contained in:
2026-11-15 05:13:48 +08:00
parent f0a2bdd854
commit 5acbea35fb
17 changed files with 921 additions and 221 deletions
+3
View File
@@ -354,6 +354,9 @@ def get_study_control(request: Request, db: Session = Depends(get_db)) -> dict:
live = (autostudy_status().get("users") or {}).get(employee_id) or {}
payload["state"] = str(live.get("state") or "")
payload["course"] = str(live.get("course") or "")
payload["message"] = str(live.get("message") or "")
workers = live.get("workers") or []
payload["workers"] = workers if isinstance(workers, list) else []
payload["active"] = bool(live) and payload["state"] not in {"已达标", "已停止", "会话失效", "会话过期"}
if payload["active"]:
payload["started"] = True