fix: restore frontend to dynamic version (undo incorrect sync from outdated backend/static)

This commit is contained in:
lt
2026-05-01 07:51:16 +08:00
parent 94295e1f74
commit e1613d2af9
3 changed files with 172 additions and 75 deletions
+10 -1
View File
@@ -30,6 +30,7 @@
.content-area { padding: 16px; padding-bottom: 80px; }
}
.user-card-list { display: none; }
/* users.html 移动端优化 */
@media (max-width: 768px) {
.user-table { display: none; }
@@ -204,7 +205,15 @@
.catch(() => {});
},
handleLogout() { localStorage.removeItem('authToken'); window.location.href = '/'; },
redirectToPage(page) { window.location.href = '/' + page; },
redirectToPage(page) {
if (!page) return;
// 处理绝对URL或相对路径
if (page.startsWith('/') || page.startsWith('http://') || page.startsWith('https://')) {
window.location.href = page;
} else {
window.location.href = '/' + page;
}
},
formatDate(dateStr) { if (!dateStr) return '-'; return new Date(dateStr.replace(' ', 'T')).toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' }); }
},
mounted() {