v0.8测试

This commit is contained in:
2026-04-16 07:55:46 +08:00
parent 7c743293be
commit c8262cf92e
16 changed files with 84 additions and 39 deletions

View File

@@ -53,7 +53,7 @@ include __DIR__ . '/../includes/header.php';
<th>分数变动</th>
<th>原因</th>
<th>操作人</th>
<?php if ($role === '班主任' || $role === '班长'): ?>
<?php if ($role === '班主任' || $role === '班长' || $role === '志愿委员'): ?>
<th>操作</th>
<?php endif; ?>
</tr>
@@ -105,14 +105,14 @@ async function loadHistory(page = 1) {
<td class="${pointsClass}">${record.points_change > 0 ? '+' : ''}${record.points_change}</td>
<td>${escapeHtml(record.reason)}</td>
<td>${escapeHtml(record.recorder_name)}</td>`;
<?php if ($role === '班主任' || $role === '班长'): ?>
<?php if ($role === '班主任' || $role === '班长' || $role === '志愿委员'): ?>
html += `<td><button class="btn btn-sm btn-danger" onclick="revokeRecord(${record.record_id})">撤销</button></td>`;
<?php endif; ?>
html += `</tr>`;
});
if (res.data.records.length === 0) {
const colSpan = <?php echo ($role === '班主任' || $role === '班长') ? '6' : '5'; ?>;
const colSpan = <?php echo ($role === '班主任' || $role === '班长' || $role === '志愿委员') ? '6' : '5'; ?>;
html = `<tr><td colspan="${colSpan}" style="text-align:center;">暂无记录</td></tr>`;
}