From 7c873bda2c26202ad96b2091221b92703b3924d9 Mon Sep 17 00:00:00 2001 From: langxm Date: Tue, 13 Oct 2026 18:00:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20hydro=5Fpid=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E4=B8=BA=201021=EF=BC=88HydroOJ=20=E9=A2=98=E7=9B=AE=E6=97=A0?= =?UTF-8?q?=20P=20=E5=89=8D=E7=BC=80=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/repositories/problem_repo.py | 4 ++-- frontend/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/repositories/problem_repo.py b/backend/app/repositories/problem_repo.py index e4580bb..828c415 100644 --- a/backend/app/repositories/problem_repo.py +++ b/backend/app/repositories/problem_repo.py @@ -29,11 +29,11 @@ class ProblemRepo: def seed_defaults(self) -> None: """M1 种子题目:P1021 最大值位置(含选择题 + 公式解释 + 测试点)。""" - if self.get_by_hydro_pid("P1021"): + if self.get_by_hydro_pid("1021"): return self.session.add( Problem( - hydro_pid="P1021", + hydro_pid="1021", title="最大值位置", course="ap-csa", unit="04 for循环与数组", diff --git a/frontend/index.html b/frontend/index.html index 6b8446c..bf6648d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -403,7 +403,7 @@ function renderJudgeCard(result, code){ function fetchJudge(code){ var dot=document.getElementById('sendDot'); fetch(API_BASE+'/api/judge', {method:'POST', headers:{'Content-Type':'application/json'}, - body:JSON.stringify({pid:(CUR_PROBLEM&&CUR_PROBLEM.hydro_pid)||'P1021', lang:'java', code:code, uid:UID})}) + body:JSON.stringify({pid:(CUR_PROBLEM&&CUR_PROBLEM.hydro_pid)||'1021', lang:'java', code:code, uid:UID})}) .then(function(r){ return r.json(); }).then(function(d){ if(!d.rid){ addMsg('judge','
⛔ 提交失败
'+(d.detail||'后端未就绪')+'
'); fallbackJudge(code); PENDING=false; dot.disabled=false; return; } LAST_RID=d.rid;