fix: restore frontend to dynamic version (undo incorrect sync from outdated backend/static)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user