fix(演示模式): 演示模式下提交列表和提交详情不再露出别人的代码——投屏装成学生时,和学生看到的一样是「别人的代码看不到」
Deploy / deploy (push) Canceled after 0s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-13 14:58:35 +08:00
1 parent 10d2638c23
commit e10a7791a2
2 files changed
+17 -1

No files matched your search

@@ -78,6 +78,12 @@ async function load(quiet = false) {
try {
const res = await getSubmission(currentId.value, true)
if (seq !== loadSeq) return
// 演示模式(超管装成学生投屏):后端照样给了别人的代码,学生是看不到的,这里也挡掉
if (userStore.demoMode && res.userId !== userStore.user?.id) {
detail.value = null
state.value = "forbidden"
return
}
detail.value = res
state.value = "ok"
if (judging.value) timer = setTimeout(() => load(true), 2000)