feat: 修复未定义房间时的处理逻辑,确保正确显示房间信息

This commit is contained in:
MKStoler1024 2025-02-01 14:48:20 +00:00
parent 5659ad56d3
commit b1f7f360ea

View File

@ -39,6 +39,10 @@ document.addEventListener("DOMContentLoaded", () => {
return fetch(`/get_config.php?id=${encodeURIComponent(configId)}`, { cache: "no-store" }) // 不保留缓存
.then(response => response.json())
.then(data => {
if (!room) {
room = data.room;
roomElem.textContent = room;
}
displayExamInfo(data);
updateCurrentTime();
updateExamInfo(data);