update
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-10-23 12:42:32 +08:00
parent 9e7fbd8ff2
commit 42ce9ac63b
6 changed files with 199 additions and 69 deletions

View File

@@ -101,10 +101,6 @@ async function submit() {
if (contestID) {
data.contest_id = parseInt(contestID)
}
if (problemSetId) {
data.problemset_id = parseInt(problemSetId)
}
// 2. 提交代码到后端
const res = await submitCode(data)
console.log(`[Submit] 代码已提交: ID=${res.data.submission_id}`)
@@ -123,11 +119,14 @@ watch(
// 1. 刷新题目状态
problem.value!.my_status = 0
// 2. 更新题单进度
// 2. 创建ProblemSetSubmission记录更新题单进度
if (problemSetId) {
console.log(problemSetId, "problemSetId")
try {
await updateProblemSetProgress(Number(problemSetId), problem.value!.id)
await updateProblemSetProgress(
Number(problemSetId),
problem.value!.id,
submission.value!.id,
)
} catch (error) {
console.error("更新题单进度失败:", error)
}