"use client" import { useParams } from "next/navigation"; import { useGetAIUserBaseInfo } from "@/hooks/aiUser"; import Image from "next/image"; // 按钮组件 interface MobileButtonProps { showIcon?: boolean; icon?: React.ReactNode | null; btnTxt?: string; showTxt?: boolean; size?: "Large" | "Medium" | "Small"; variant?: "Contrast" | "Basic" | "Ghost"; type?: "Primary" | "Secondary" | "Tertiary" | "Destructive" | "VIP"; state?: "Default" | "Disabled" | "Pressed"; onClick?: () => void; } function MobileButton({ showIcon = true, icon = null, btnTxt = "Button", showTxt = true, size = "Large", variant = "Basic", type = "Primary", state = "Default", onClick }: MobileButtonProps) { if (size === "Small" && variant === "Contrast" && type === "Tertiary" && state === "Default") { return ( ); } return ( ); } const SharePage = () => { const { userId } = useParams(); const { data: userInfo } = useGetAIUserBaseInfo({ aiId: userId ? Number(userId) : 0 }); const { homeImageUrl } = userInfo || {}; const handleChatClick = () => { // 跳转到应用或下载页面 window.open('https://crushlevel.com/download', '_blank'); }; return (
{/* 背景图片 */}
Background
{/* 内容容器 */}
{/* 头部用户信息 */}
{/* 用户头像 */}
{userInfo?.headImg ? ( {userInfo.nickname ) : (
{userInfo?.nickname?.charAt(0) || 'U'}
)}
{/* 用户名和点赞数 */}

{userInfo?.nickname || 'Loading...'}

0 likes

{/* 主要内容区域 */}
{/* 消息内容 */}
{/* AI信息卡片 */}
{/* 介绍文本 */}

Intro: {userInfo?.introduction || 'This is an AI character with unique personality and charm. Start chatting to discover more about them!'}

{/* 标签 */}
{userInfo?.tagName ? ( userInfo.tagName.split(',').slice(0, 2).map((tag: string, index: number) => (
{tag.trim()}
)) ) : ( <>
Sensual
Romantic
)}
{/* AI生成内容提示 */}
Content generated by AI
{/* 示例对话消息 */}
{/* 语音标签 */}
2''
{/* 消息内容 */}
(Watching her parents toast you respectfully, I feel very sad.) Are you?
{/* 底部品牌区域 */}
{/* App图标 */}
Crushlevel Logo
{/* 品牌信息 */}
Crushlevel
Chat. Crush. AI Date
{/* Chat按钮 */}
); } export default SharePage;