fix: 补齐审查清单里还没落地的交互和代理复测

This commit is contained in:
2026-11-16 16:17:31 +08:00
parent 58b3dedb2a
commit 50a8ae2e27
19 changed files with 444 additions and 192 deletions
+18 -5
View File
@@ -26,11 +26,19 @@ const hoursSource = ref("api");
let savedTimer = 0;
function detailOf(payload: unknown, fallback: string) {
if (payload && typeof payload === "object" && "detail" in payload) {
const detail = (payload as { detail?: unknown }).detail;
if (typeof detail === "string" && detail) return detail;
}
return fallback;
if (!payload || typeof payload !== "object" || !("detail" in payload)) return fallback;
const detail = (payload as { detail?: unknown }).detail;
if (typeof detail === "string" && detail) return detail;
if (!Array.isArray(detail)) return fallback;
const texts = detail.flatMap((item) => {
if (typeof item === "string" && item) return [item];
if (item && typeof item === "object" && "msg" in item) {
const msg = (item as { msg?: unknown }).msg;
if (typeof msg === "string" && msg) return [msg];
}
return [];
});
return texts.length ? texts.join(";") : fallback;
}
function readNumber(value: unknown) {
@@ -107,6 +115,11 @@ async function save() {
return;
}
}
if (hbMode.value !== "manual") {
if (hbVideo.value == null) hbVideo.value = 30;
if (hbDocument.value == null) hbDocument.value = 120;
if (hbScorm.value == null) hbScorm.value = 120;
}
const adminUsername = username.value.trim();
if (!adminUsername) {
errorText.value = "请填写管理员用户名";