import { useState } from "react"; import { Phone, Mail, Globe, MessageSquare, Copy, Check, Headset } from "lucide-react"; type Channel = { key: string; icon: typeof Phone; label: string; value: string; href?: string; copy: string; }; const CHANNELS: Channel[] = [ { key: "phone", icon: Phone, label: "电话", value: "188 6595 7520", href: "tel:18865957520", copy: "18865957520", }, { key: "email", icon: Mail, label: "邮箱", value: "1115084741@qq.com", href: "mailto:1115084741@qq.com", copy: "1115084741@qq.com", }, { key: "site", icon: Globe, label: "官网", value: "www.wenyaoyu.com", href: "https://www.wenyaoyu.com", copy: "https://www.wenyaoyu.com", }, { key: "wechat", icon: MessageSquare, label: "微信", value: "s-b-m-y", copy: "s-b-m-y", }, ]; export default function Contact() { const [copied, setCopied] = useState(null); async function copy(channel: Channel) { try { await navigator.clipboard.writeText(channel.copy); setCopied(channel.key); setTimeout(() => setCopied((k) => (k === channel.key ? null : k)), 1500); } catch { /* clipboard unavailable */ } } return (

联系我们

欢迎交流与对接合作。无论是数据接入、商务合作还是问题反馈,都可以通过以下任一方式联系我们。

{CHANNELS.map((c) => { const Icon = c.icon; return (
{c.label}
{c.href ? ( {c.value} ) : (
{c.value}
)}
); })}
); }