fix: resolve deployment errors and add missing files

Fix CSS issue and create missing documentation files
Add new data platform and mobile optimization features

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
This commit is contained in:
v0
2025-07-19 02:34:18 +00:00
parent ea95107713
commit 901763fae0
20 changed files with 3216 additions and 1882 deletions

View File

@@ -12,9 +12,11 @@ import {
X,
ChevronDown,
ChevronRight,
Tag,
Search,
BarChart3,
TrendingUp,
Brain,
HelpCircle,
} from "lucide-react"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
@@ -27,8 +29,9 @@ interface MobileSidebarProps {
export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) {
const pathname = usePathname()
const [expandedSections, setExpandedSections] = useState({
"user-portrait": false,
"user-value": false,
"user-discovery": false,
"user-valuation": false,
"ai-analysis": false,
})
const toggleSection = (section: string) => {
@@ -59,56 +62,83 @@ export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) {
description: "平台整体数据分析",
},
{
title: "数据集成",
href: "/data-integration",
title: "数据中台",
href: "/data-platform",
icon: <Database className="h-4 w-4" />,
primary: true,
tag: "核心",
description: "多源数据整合平台",
description: "多源数据整合中心",
},
{
title: "用户画像",
href: "/user-portrait",
icon: <Users className="h-4 w-4" />,
title: "用户发现",
href: "/user-discovery",
icon: <Search className="h-4 w-4" />,
primary: true,
expandable: true,
section: "user-portrait",
description: "用户标签与分群分析",
section: "user-discovery",
description: "用户行为洞察分析",
children: [
{
title: "流量关键词",
href: "/user-portrait/keywords",
icon: <Tag className="h-3 w-3" />,
description: "关键词价值评估",
title: "行为分析",
href: "/user-discovery/behavior",
icon: <BarChart3 className="h-3 w-3" />,
description: "用户行为模式分析",
},
{
title: "标签管理",
href: "/user-portrait/tags",
icon: <Tag className="h-3 w-3" />,
description: "用户标签分类",
title: "用户分群",
href: "/user-discovery/segmentation",
icon: <Users className="h-3 w-3" />,
description: "智能用户分群",
},
],
},
{
title: "价值评估",
href: "/user-value",
title: "用户估值",
href: "/user-valuation",
icon: <Target className="h-4 w-4" />,
primary: true,
expandable: true,
section: "user-value",
description: "用户价值分析模型",
section: "user-valuation",
description: "用户价值评估模型",
hasHelp: true,
children: [
{
title: "估值模型",
href: "/user-value/model",
href: "/user-valuation/model",
icon: <BarChart3 className="h-3 w-3" />,
description: "RFM价值模型",
description: "RFM价值评估",
hasHelp: true,
},
{
title: "升级路径",
href: "/user-value/upgrade-paths",
href: "/user-valuation/upgrade-paths",
icon: <TrendingUp className="h-3 w-3" />,
description: "用户价值提升",
description: "用户价值提升策略",
hasHelp: true,
},
],
},
{
title: "AI分析",
href: "/ai-analysis",
icon: <Brain className="h-4 w-4" />,
primary: true,
expandable: true,
section: "ai-analysis",
description: "智能数据洞察",
tag: "AI",
children: [
{
title: "趋势识别",
href: "/ai-analysis/trends",
icon: <TrendingUp className="h-3 w-3" />,
description: "AI趋势预测",
},
{
title: "异常检测",
href: "/ai-analysis/anomaly",
icon: <Search className="h-3 w-3" />,
description: "智能异常监控",
},
],
},
@@ -118,6 +148,8 @@ export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) {
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"
}
@@ -137,7 +169,7 @@ export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) {
{/* 侧边栏 */}
<div
className={cn(
"fixed left-0 top-0 h-full w-72 glass-nav safe-area-top safe-area-left z-50 transition-transform duration-300 ease-out",
"fixed left-0 top-0 h-full w-80 glass-nav safe-area-top safe-area-left z-50 transition-transform duration-300 ease-out",
isOpen ? "translate-x-0" : "-translate-x-full",
)}
>
@@ -173,7 +205,10 @@ export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) {
<div className="transition-colors duration-300 flex-shrink-0">{item.icon}</div>
<div className="flex-1 ml-2 min-w-0">
<div className="flex items-center justify-between">
<span className="font-medium truncate">{item.title}</span>
<div className="flex items-center gap-1">
<span className="font-medium truncate">{item.title}</span>
{item.hasHelp && <HelpCircle className="h-3 w-3 text-gray-400 flex-shrink-0" />}
</div>
{item.tag && (
<Badge
className={cn("text-xs px-1.5 py-0.5 rounded ml-1 flex-shrink-0", getTagColor(item.tag))}
@@ -218,7 +253,10 @@ export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) {
{subItem.icon}
</div>
<div className="min-w-0 flex-1">
<p className="font-medium truncate">{subItem.title}</p>
<div className="flex items-center gap-1">
<p className="font-medium truncate">{subItem.title}</p>
{subItem.hasHelp && <HelpCircle className="h-3 w-3 text-gray-400 flex-shrink-0" />}
</div>
<p className="text-xs text-gray-500 truncate">{subItem.description}</p>
</div>
</Link>
@@ -234,15 +272,15 @@ export default function MobileSidebar({ isOpen, onClose }: MobileSidebarProps) {
<div className="border-t border-white/20 p-3">
<div className="glass-light rounded-lg p-2">
<div className="flex items-center justify-between text-xs">
<span className="text-gray-600"></span>
<span className="text-gray-600">AI引擎状态</span>
<div className="flex items-center">
<div className="w-2 h-2 bg-green-500 rounded-full mr-1"></div>
<span className="text-green-600"></span>
<span className="text-green-600"></span>
</div>
</div>
<div className="flex items-center justify-between text-xs mt-1">
<span className="text-gray-600"></span>
<span className="text-gray-500">2</span>
<span className="text-gray-600"></span>
<span className="text-gray-500"></span>
</div>
</div>
</div>