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','