import { ArrowUp, ChevronDown, ChevronUp } from "lucide-react" import { useState } from "react" import { cn } from "@/lib/utils" import gzh from "../assets/gzh.webp" import phoneImg from "../assets/phone.webp" import qqImg from "../assets/qq.webp" import topImg from "../assets/top.webp" import wxImg from "../assets/wx.webp" export default function Common() { const [activePopup, setActivePopup] = useState<"gzh" | "tel" | null>(null) const [isExpanded, setIsExpanded] = useState(false) // QQ点击跳转 const handleQQClick = () => { window.location.href = "https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2852138148&fid=299&key=f377ec024ca45115a03a7632c7bda230&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true" } // 微信点击跳转 const handleWxClick = () => { window.open("https://work.weixin.qq.com/kfid/kfc458bc58e79e5093f", "_blank") } return ( <> {/* ========== 桌面端 ========== */}
{ if (e.key === "Enter" || e.key === " ") { handleQQClick() } }} role="button" tabIndex={0} className="flex flex-col items-center justify-center py-2 text-white border-b border-white/15 hover:bg-white/10 transition-colors cursor-pointer" > QQ QQ
{ if (e.key === "Enter" || e.key === " ") { handleWxClick() } }} role="button" tabIndex={0} className="flex flex-col items-center justify-center py-2 text-white border-b border-white/15 hover:bg-white/10 transition-colors cursor-pointer" > 微信 微信
setActivePopup("gzh")} onMouseLeave={() => setActivePopup(null)} onFocus={() => setActivePopup("gzh")} onBlur={() => setActivePopup(null)} onKeyDown={e => { if (e.key === "Enter" || e.key === " ") { setActivePopup(prev => (prev === "gzh" ? null : "gzh")) } }} > 公众号 公众号 {activePopup === "gzh" && (
公众号二维码

实时响应 在线时间 8:30-23:00

关注公众号可获取免费的到期提醒服务

)}
setActivePopup("tel")} onMouseLeave={() => setActivePopup(null)} onFocus={() => setActivePopup("tel")} onBlur={() => setActivePopup(null)} onKeyDown={e => { if (e.key === "Enter" || e.key === " ") { setActivePopup(prev => (prev === "tel" ? null : "tel")) } }} > 电话 电话 {activePopup === "tel" && (

400 800 9925

实时接通

电话值班时间 8:30-23:00

)}
{/* ========== 移动端:底部折叠面板 ========== */}
{/* 折叠面板 */}
{/* 拖拽条*/}
setIsExpanded(!isExpanded)} className="flex flex-col items-center justify-center py-2.5 cursor-pointer hover:bg-gray-50 transition-colors rounded-t-2xl" >
{isExpanded ? "收起" : "联系我们"} {isExpanded ? ( ) : ( )}
{/* 展开内容 */}
{/* QQ */}
QQ

QQ客服

点击立即咨询

{/* 微信 */}
微信

微信客服

点击立即咨询

{/* 公众号 */}
setActivePopup(activePopup === "gzh" ? null : "gzh") } className="flex items-center gap-4 p-3 bg-purple-50 rounded-xl hover:bg-purple-100 transition-colors cursor-pointer" >
公众号

公众号

点击查看二维码

{/* 公众号二维码展开 */} {activePopup === "gzh" && (
公众号二维码

实时响应 在线时间 8:30-23:00

关注公众号可获取免费的到期提醒服务

)} {/* 电话 */}
setActivePopup(activePopup === "tel" ? null : "tel") } className="flex items-center gap-4 p-3 bg-orange-50 rounded-xl hover:bg-orange-100 transition-colors cursor-pointer" >
电话

电话客服

点击查看号码

{/* 电话展开 */} {activePopup === "tel" && (

400 800 9925

实时接通

电话值班时间 8:30-23:00

)} {/* 回到顶部 */}
) }