更新v1.4版本,修复了一些已知问题
This commit is contained in:
@@ -285,7 +285,7 @@ include __DIR__ . '/../includes/header.php';
|
||||
html += `
|
||||
<div class="record-item">
|
||||
<span class="record-points ${pointsClass}">${record.points_change > 0 ? '+' : ''}${record.points_change}</span>
|
||||
<span class="record-reason">${record.reason}</span>
|
||||
<span class="record-reason">${escapeHtml(record.reason)}</span>
|
||||
<span class="record-time">${formatDate(record.created_at)}</span>
|
||||
</div>
|
||||
`;
|
||||
@@ -347,8 +347,8 @@ include __DIR__ . '/../includes/header.php';
|
||||
<tr>
|
||||
<td>${formatDateTime(record.created_at)}</td>
|
||||
<td class="record-points ${pointsClass}">${record.points_change > 0 ? '+' : ''}${record.points_change}</td>
|
||||
<td>${record.reason}</td>
|
||||
<td>${record.recorder_name}</td>
|
||||
<td>${escapeHtml(record.reason)}</td>
|
||||
<td>${escapeHtml(record.recorder_name)}</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@@ -369,21 +369,9 @@ include __DIR__ . '/../includes/header.php';
|
||||
}
|
||||
|
||||
function renderConductPagination() {
|
||||
const container = document.getElementById('conductPagination');
|
||||
if (!container) return;
|
||||
if (conductTotalPages <= 1) {
|
||||
container.innerHTML = '';
|
||||
return;
|
||||
}
|
||||
let html = '';
|
||||
for (let i = 1; i <= conductTotalPages; i++) {
|
||||
if (i === conductPage) {
|
||||
html += `<span class="active">${i}</span>`;
|
||||
} else {
|
||||
html += `<a href="#" onclick="loadConductHistory(${i}); return false;">${i}</a>`;
|
||||
}
|
||||
}
|
||||
container.innerHTML = html;
|
||||
renderSmartPagination('conductPagination', conductPage, conductTotalPages, function(page) {
|
||||
loadConductHistory(page);
|
||||
});
|
||||
}
|
||||
|
||||
// 加载作业
|
||||
@@ -395,11 +383,11 @@ include __DIR__ . '/../includes/header.php';
|
||||
res.data.homework.forEach(hw => {
|
||||
html += `
|
||||
<tr>
|
||||
<td>${hw.subject_name}</td>
|
||||
<td>${hw.title}</td>
|
||||
<td>${hw.deadline}</td>
|
||||
<td>${escapeHtml(hw.subject_name)}</td>
|
||||
<td>${escapeHtml(hw.title)}</td>
|
||||
<td>${escapeHtml(hw.deadline)}</td>
|
||||
<td>${getStatusBadge(hw.status, 'homework')}</td>
|
||||
<td>${hw.comments || '-'}</td>
|
||||
<td>${escapeHtml(hw.comments || '-')}</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@@ -428,9 +416,9 @@ include __DIR__ . '/../includes/header.php';
|
||||
res.data.records.forEach(record => {
|
||||
html += `
|
||||
<tr>
|
||||
<td>${record.date}</td>
|
||||
<td>${escapeHtml(record.date)}</td>
|
||||
<td>${getStatusBadge(record.status, 'attendance')}</td>
|
||||
<td>${record.reason || '-'}</td>
|
||||
<td>${escapeHtml(record.reason || '-')}</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user