From 3067542e53743747e246323fd41d6cfb6468dff1 Mon Sep 17 00:00:00 2001 From: canglan Date: Mon, 15 Jun 2026 09:15:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=A6=E7=94=9F=E7=AB=AF?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/student/dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/student/dashboard.php b/frontend/student/dashboard.php index f3ad702..42db220 100644 --- a/frontend/student/dashboard.php +++ b/frontend/student/dashboard.php @@ -393,6 +393,7 @@ include __DIR__ . '/../includes/header.php'; async function loadHomework() { try { const res = await apiGet(`/api/student/homework/${STUDENT_ID}`); + let html = ''; if (res && res.success) { res.data.homework.forEach(record => { const pointsClass = record.points_change > 0 ? 'plus' : 'minus'; @@ -410,7 +411,6 @@ include __DIR__ . '/../includes/header.php'; if (res.data.homework.length === 0) { html = '暂无作业扣分记录'; } - } document.getElementById('homeworkList').innerHTML = html; } } catch (error) {