"use client" import { useState } from "react" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { Check, CreditCard, GitBranch, Monitor, ArrowRight } from "lucide-react" import { cn } from "@/lib/utils" import { SectionReveal } from "@/components/ui/section-reveal" import homeData from "@/data/home.json" import Link from "next/link" const iconMap: Record = { pos: , split: , monitor: , } const accentMap: Record = { blue: { bg: "bg-primary", border: "border-primary/20", text: "text-primary", glow: "shadow-primary/20", }, indigo: { bg: "bg-indigo-600", border: "border-indigo-500/20", text: "text-indigo-600", glow: "shadow-indigo-500/20", }, violet: { bg: "bg-violet-600", border: "border-violet-500/20", text: "text-violet-600", glow: "shadow-violet-500/20", }, } export function ProductsSection() { const { products } = homeData const productsAny = products as any const sectionBadge = productsAny.sectionBadge ?? productsAny.sectionTag const normalizedItems = (Array.isArray(productsAny.items) ? productsAny.items : []).map((item: any) => { const id = item.id ?? "" const iconType = item.iconType ?? (id === "cashier" ? "pos" : id === "split" ? "split" : "monitor") const color = item.color ?? (id === "cashier" ? "blue" : id === "split" ? "indigo" : "violet") return { ...item, iconType, color, title: item.title ?? item.name ?? item.tag, } }) const [active, setActive] = useState(0) const current = normalizedItems[active] ?? normalizedItems[0] const accent = accentMap[current?.color] ?? accentMap.blue if (!current) { return null } return (
{/* Header */}
{sectionBadge}

{products.title}

{products.subtitle}

{/* Tab switcher */}
{normalizedItems.map((item, i) => { const a = accentMap[item.color] ?? accentMap.blue return ( ) })}
{/* Detail panel */}
{/* Left: info */}
{iconMap[current.iconType] ?? iconMap.monitor} {current.tag}

{current.title}

{current.tagline}

{current.description}

{current.highlight}

关键性能指标

{current.highlightSub}

交付稳定性承诺

    {current.features.map((f) => (
  • {f}
  • ))}
{/* Right: visual mock */}
{/* Dark card base */}
{/* Top bar */}
{/* Body: chart + cards */}
{/* Stat row */}
{["日营业额", "交易笔数", "分账金额"].map((label, i) => (
{i === 0 ? "¥48,260" : i === 1 ? "1,203" : "¥12,400"}
{label}
))}
{/* Bar chart */}

近 7 日趋势

{[55, 70, 45, 88, 65, 92, 78].map((h, i) => (
))}
{/* Glow overlay */}
{/* Floating badge */}
系统运行正常
) }