feat: 学习进度轮询、学时依据与首页代理弹窗
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user