"use client" import { useEffect, useState } from "react" import Link from "next/link" import { usePathname } from "next/navigation" import { cn } from "@/lib/utils" import { Database, LayoutDashboard, Users, Target, X, ChevronDown, ChevronRight, Search, BarChart3, TrendingUp, Brain, HelpCircle, } from "lucide-react" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" interface MobileSidebarProps { isOpen: boolean onClose: () => void } export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) { const pathname = usePathname() const [expandedSections, setExpandedSections] = useState({ "user-discovery": false, "user-valuation": false, "ai-analysis": false, }) const toggleSection = (section: string) => { setExpandedSections((prev) => ({ ...prev, [section]: !prev[section], })) } useEffect(() => { if (isOpen) { document.body.style.overflow = "hidden" } else { document.body.style.overflow = "unset" } return () => { document.body.style.overflow = "unset" } }, [isOpen]) const navItems = [ { title: "数据概览", href: "/", icon: , primary: true, description: "平台整体数据分析", }, { title: "数据中台", href: "/data-platform", icon: , primary: true, tag: "核心", description: "多源数据整合中心", }, { title: "用户发现", href: "/user-discovery", icon: , primary: true, expandable: true, section: "user-discovery", description: "用户行为洞察分析", children: [ { title: "行为分析", href: "/user-discovery/behavior", icon: , description: "用户行为模式分析", }, { title: "用户分群", href: "/user-discovery/segmentation", icon: , description: "智能用户分群", }, ], }, { title: "用户估值", href: "/user-valuation", icon: , primary: true, expandable: true, section: "user-valuation", description: "用户价值评估模型", hasHelp: true, children: [ { title: "估值模型", href: "/user-valuation/model", icon: , description: "RFM价值评估", hasHelp: true, }, { title: "升级路径", href: "/user-valuation/upgrade-paths", icon: , description: "用户价值提升策略", hasHelp: true, }, ], }, { title: "AI分析", href: "/ai-analysis", icon: , primary: true, expandable: true, section: "ai-analysis", description: "智能数据洞察", tag: "AI", children: [ { title: "趋势识别", href: "/ai-analysis/trends", icon: , description: "AI趋势预测", }, { title: "异常检测", href: "/ai-analysis/anomaly", icon: , description: "智能异常监控", }, ], }, ] const getTagColor = (tag: string) => { switch (tag) { case "核心": return "bg-blue-100 text-blue-700 border-blue-200" case "AI": return "bg-purple-100 text-purple-700 border-purple-200" default: return "bg-gray-100 text-gray-700 border-gray-200" } } return ( <> {/* 背景遮罩 */}
{/* 侧边栏 */}
{/* 头部 */}

数据资产中台

{/* 导航菜单 */}
{/* 底部信息 */}
AI引擎状态
运行中
数据同步 实时
) }