v0.8.2测试

This commit is contained in:
2026-04-16 09:21:46 +08:00
parent c543de1dfe
commit bc9e35a45d
3 changed files with 20 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ include __DIR__ . '/../includes/header.php';
<div class="table-wrapper">
<table class="table">
<thead>
<tr><th>用户名</th><th>姓名</th><th>角色</th><th>关联科目</th></tr>
<tr><th>用户名</th><th>姓名</th><th>角色</th></tr>
</thead>
<tbody id="adminList"></tbody>
</table>
@@ -95,11 +95,10 @@ async function loadAdmins() {
<td>${escapeHtml(admin.username)}</td>
<td>${escapeHtml(admin.real_name)}</td>
<td>${escapeHtml(admin.role_type)}</td>
<td>${admin.subject_name || '-'}</td>
</tr>`;
});
if (res.data.admins.length === 0) {
html = '<tr><td colspan="4" style="text-align:center;">暂无管理员</td></tr>';
html = '<tr><td colspan="3" style="text-align:center;">暂无管理员</td></tr>';
}
document.getElementById('adminList').innerHTML = html;
}