"use client" import Link from "next/link" import { usePathname } from "next/navigation" import { Home, MessageCircle, User, BookOpen } from "lucide-react" import { useState } from "react" import { QRCodeModal } from "./modules/marketing/qr-code-modal" export function BottomNav() { const pathname = usePathname() const [showQRModal, setShowQRModal] = useState(false) // 在文档页面和管理后台不显示底部导航 if (pathname.startsWith("/documentation") || pathname.startsWith("/admin")) { return null } const navItems = [ { href: "/", icon: Home, label: "首页" }, { href: "/chapters", icon: BookOpen, label: "目录" }, { action: () => setShowQRModal(true), icon: MessageCircle, label: "派对群" }, { href: "/my", icon: User, label: "我的" }, ] return ( <> {/* iOS风格底部导航 */} {navItems.map((item, index) => { const isActive = item.href ? pathname === item.href : false const Icon = item.icon if (item.action) { return ( {item.label} ) } return ( {item.label} {/* 激活指示器 */} {isActive && ( )} ) })} setShowQRModal(false)} /> > ) }