From b87ab6c7b8344ad32f1ea2851566cdbdfd916f5f Mon Sep 17 00:00:00 2001 From: "1173117610@qq.com" Date: Mon, 11 May 2026 15:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/bottom-nav/bottom-nav.vue | 8 +- pages.json | 6 + pages/classify/classify.vue | 297 +++++++++++++++++++++++++++ 3 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 pages/classify/classify.vue diff --git a/components/bottom-nav/bottom-nav.vue b/components/bottom-nav/bottom-nav.vue index 3466d40..7753c3c 100644 --- a/components/bottom-nav/bottom-nav.vue +++ b/components/bottom-nav/bottom-nav.vue @@ -29,8 +29,11 @@ url: 'https://api.cmspro.haodanku.com/bottomBar/lists?cid=qOstW90', success: (res) => { if (res.data && res.data.code === 200 && res.data.data.bottom_bar) { - // 根据 sort 降序排序 - this.bottomBarList = res.data.data.bottom_bar.sort((a, b) => b.sort - a.sort); + // 过滤并排序:剔除“发现”,仅保留首页、榜单、分类 + const allowedTitles = ['首页', '榜单', '分类']; + this.bottomBarList = res.data.data.bottom_bar + .filter(item => allowedTitles.includes(item.title)) + .sort((a, b) => b.sort - a.sort); } } }); @@ -41,6 +44,7 @@ let url = ''; if (tab.title === '首页') url = '/pages/index/index'; else if (tab.title === '榜单') url = '/pages/rank/rank'; + else if (tab.title === '分类') url = '/pages/classify/classify'; if (url) { uni.redirectTo({ diff --git a/pages.json b/pages.json index f95c03a..d3ced2e 100644 --- a/pages.json +++ b/pages.json @@ -29,6 +29,12 @@ "style": { "navigationStyle": "custom" } + }, + { + "path": "pages/classify/classify", + "style": { + "navigationStyle": "custom" + } } ], "globalStyle": { diff --git a/pages/classify/classify.vue b/pages/classify/classify.vue new file mode 100644 index 0000000..d3ac733 --- /dev/null +++ b/pages/classify/classify.vue @@ -0,0 +1,297 @@ + + + + +