2025-07-18 13:47:12 +00:00
|
|
|
"use client"
|
|
|
|
|
|
|
|
|
|
import Link from "next/link"
|
|
|
|
|
import { usePathname } from "next/navigation"
|
2025-07-21 00:11:52 +00:00
|
|
|
import { Home, Database, Target, BrainCircuit } from "lucide-react" // 引入AI智能助手图标
|
2025-07-18 13:47:12 +00:00
|
|
|
|
|
|
|
|
const navItems = [
|
2025-07-19 02:17:17 +00:00
|
|
|
{ href: "/", icon: Home, label: "概览" },
|
2025-07-19 02:34:18 +00:00
|
|
|
{ href: "/data-platform", icon: Database, label: "数据中台" },
|
2025-07-21 00:11:52 +00:00
|
|
|
{ href: "/user-portrait", icon: Target, label: "用户画像" }, // 整合用户池功能
|
|
|
|
|
{ href: "/ai-assistant", icon: BrainCircuit, label: "AI助手" }, // 新增AI智能助手
|
2025-07-18 13:47:12 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export default function BottomNav() {
|
|
|
|
|
const pathname = usePathname()
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<nav className="fixed bottom-0 left-0 right-0 glass-nav safe-area-bottom z-50 mx-2 mb-2">
|
|
|
|
|
<div className="flex justify-around items-center py-2">
|
|
|
|
|
{navItems.map((item) => {
|
|
|
|
|
const isActive = pathname === item.href || (item.href !== "/" && pathname.startsWith(item.href))
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Link
|
|
|
|
|
key={item.href}
|
|
|
|
|
href={item.href}
|
2025-07-19 02:34:18 +00:00
|
|
|
className={`flex flex-col items-center justify-center px-1 py-2 rounded-xl transition-all duration-300 min-w-0 flex-1 ${
|
2025-07-18 13:47:12 +00:00
|
|
|
isActive ? "glass-heavy text-blue-600 scale-105" : "text-gray-600 hover:glass-light hover:text-blue-500"
|
|
|
|
|
}`}
|
|
|
|
|
>
|
2025-07-19 02:17:17 +00:00
|
|
|
<item.icon className={`h-4 w-4 mb-1 ${isActive ? "text-blue-600" : ""}`} />
|
2025-07-18 13:47:12 +00:00
|
|
|
<span className="text-xs font-medium truncate">{item.label}</span>
|
|
|
|
|
</Link>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
)
|
|
|
|
|
}
|