BUG修复,返回结构统一

This commit is contained in:
李琦
2026-01-16 17:03:34 +08:00
parent 87ed11db7a
commit e6edf7210b
57 changed files with 3642 additions and 1074 deletions

View File

@@ -358,7 +358,13 @@ const runCode = async () => {
})
})
const result = await response.json()
if (!response.ok) {
const errorData = await response.json()
throw new Error(errorData.message || '代码执行失败')
}
const data = await response.json()
const result = data.result // 从统一响应格式中提取 result
let outputHtml = ''
if (result.error) {