From 58f330a0c9af7e3554c261a33c43616e23d53d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E5=BC=BA?= <357099073@qq.com> Date: Sat, 7 Jun 2025 16:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E8=BF=87=E6=9C=9F=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/component/main.php | 107 ++++-------------------------- app/index/view/user/login.php | 12 +++- 2 files changed, 22 insertions(+), 97 deletions(-) diff --git a/app/index/view/component/main.php b/app/index/view/component/main.php index 040a184..9fae7fd 100644 --- a/app/index/view/component/main.php +++ b/app/index/view/component/main.php @@ -290,17 +290,17 @@ function bindTabEvents(moduleId) { const tabItems = document.querySelectorAll(`#${moduleId} .tab-item`); tabItems.forEach(tab => { - tab.addEventListener('click', function() { + tab.addEventListener('click', function () { // 移除所有active类 tabItems.forEach(item => item.classList.remove('active')); // 添加active类到当前点击的tab this.classList.add('active'); - + // 获取选中的分类ID const selectedCategoryId = this.getAttribute('data-tab'); - + // 根据不同模块加载对应数据 - switch(moduleId) { + switch (moduleId) { case 'opencourse': loadCategoryArticles(selectedCategoryId, 'webArticlesList'); break; @@ -387,7 +387,7 @@ // 创建文章HTML function createArticleHtml(article) { if (!article) return ''; - + // 格式化日期 const publishDate = new Date(article.publishdate * 1000); const formattedDate = publishDate.toLocaleDateString('zh-CN', { @@ -395,7 +395,7 @@ month: '2-digit', day: '2-digit' }); - + return `
- 点击二维码可刷新
+