fixed85-94: filter分页/搜索分页/直播页返回与静音/动漫分类入口
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
This commit is contained in:
1 parent
395a8fd3f5
commit
421328c6cb
8 files changed
+61
-39
No files matched your search
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { Clover, Film, Filter, Home, Radio, Search, Tv } from 'lucide-react';
|
||||
import { Clover, Film, Filter, Home, Radio, Search, Sparkles, Tv } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
@@ -30,6 +30,11 @@ const MobileBottomNav = ({ activePath }: MobileBottomNavProps) => {
|
||||
label: '剧集',
|
||||
href: '/douban?type=tv',
|
||||
},
|
||||
{
|
||||
icon: Sparkles,
|
||||
label: '动漫',
|
||||
href: '/douban?type=tv&cat=tv_animation',
|
||||
},
|
||||
{
|
||||
icon: Clover,
|
||||
label: '综艺',
|
||||
@@ -50,6 +55,7 @@ const MobileBottomNav = ({ activePath }: MobileBottomNavProps) => {
|
||||
const isActive = (href: string) => {
|
||||
if (href === '/filter') return currentActive.startsWith('/filter');
|
||||
const typeMatch = href.match(/type=([^&]+)/)?.[1];
|
||||
const catMatch = href.match(/cat=([^&]+)/)?.[1];
|
||||
|
||||
// 解码URL以进行正确的比较
|
||||
const decodedActive = decodeURIComponent(currentActive);
|
||||
@@ -58,7 +64,8 @@ const MobileBottomNav = ({ activePath }: MobileBottomNavProps) => {
|
||||
return (
|
||||
decodedActive === decodedItemHref ||
|
||||
(decodedActive.startsWith('/douban') &&
|
||||
decodedActive.includes(`type=${typeMatch}`))
|
||||
decodedActive.includes(`type=${typeMatch}`) &&
|
||||
(catMatch ? decodedActive.includes(`cat=${catMatch}`) : !decodedActive.includes('cat=')))
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user