import { useState, useEffect } from 'react'; import { Bot, MapPin, Cpu, ArrowRight, BarChart3, Gamepad2, Terminal, Ticket, Zap, Menu, X, Sun, Moon, Feather, BookOpen, // Used for the letter link BrainCircuit } from 'lucide-react'; import { useNavigate, useLocation } from 'react-router-dom'; import i18n from '../i18n'; // 多语言配置 const translations = { zh: { nav: { core: '业务板块', consulting: '企业咨询', tourism: '文旅运营', dev: '开发者', contact: '联系我们', }, hero: { quote: '"玩"意味着一种无拘无束的自由状态。', quoteSub: '你会发现,每个真正懂得玩的人,他们玩的方式都是独一无二的,充满了自发的创造力与鲜明的个性。', // Logic update: Focusing on the "Why" and the ecosystem sectionTitle: '为了让大家能 "纯粹的玩",我们构建了三层业务生态', }, cards: { // Step 1: Liberate consultingTitle: '第一步:解放时间', consultingDesc: '首先,我们用AI为企业降本增效。只有把人从繁琐工作中解放出来,才有时间去玩。', consultingLink: '查看企业AI方案', // Step 2: Create Fun tourismTitle: '第二步:创造乐趣', tourismDesc: '然后,我们用技术重塑文旅体验。打卡地图与游戏化运营,让旅行回归玩的本质。', tourismLink: '查看文旅案例', // Step 3: Support Creation devTitle: '第三步:支持创造', devDesc: '最后,我们为AI一人公司提供基建。让每一个想玩的灵魂,拥有实现梦想的算力。', devLink: '获取开发资源' }, consulting: { tag: 'Consulting', title: '从繁杂中解放', titleHighlight: '回归创造', description: '我们为企业提供深度 IT 与 AI 咨询。这不是为了卷,而是为了降本提效,让团队从重复劳动中解脱出来。', items: [ '企业私有知识库 (RAG)', '自动化研报/公文撰写', 'AI 辅助决策系统', '传统 IT 架构改造' ], reportTitle: '效率诊断', reportDesc: 'AI 自动生成深度行业研究报告,将 3 天的撰写周期缩短至 15 分钟。' }, tourism: { tag: 'Cultural Tourism', title: '打通文旅地产', titleHighlight: '变现渠道', description: '我们推出了一套以打卡地图、商户优惠券发放、抽奖游戏活动为核心的文旅运营解决方案。', features: { map: { title: '打卡地图', desc: 'LBS 定位解锁景点' }, coupon: { title: '优惠券', desc: '连接商户与游客' }, game: { title: '抽奖活动', desc: '提升游客留存率' }, data: { title: 'CPS分成', desc: '按效果获取收益' } }, mockup: { title: '西湖寻宝季', gift: '🎁 待领取: 咖啡券', btn: '扫码打卡' } }, dev: { tag: 'Infrastructure', title: '支持每一个', titleHighlight: '超级个体', description: '针对 AI 一人公司,我们提供基础设施服务,让你像玩乐高一样构建产品。', features: { token: { title: 'Token 分发', desc: 'OpenAI / Claude / DeepSeek 聚合接口' }, compute: { title: '弹性算力', desc: '高性价比 GPU 租赁' }, saas: { title: 'SaaS 套件', desc: '一键部署的创业脚手架' } } }, contact: { title: '保持联系', description: '既然来了,我会尽一切努力让你纯粹的玩。', formTitle: '发送邮件', placeholderName: '你的称呼', placeholderEmail: '你的邮箱', submit: '发送', footerLetter: '阅读:给玩友们的一封信', footerShareholder: '阅读:2025年5月29日给股东们的信', footerNote: '"纯粹的玩"由几位股东共同创立,我作为现在的法人和大股东,拥有最终决策权。', copyright: '© 2026 杭州纯粹的玩品牌科技有限公司' } }, en: { nav: { core: 'Sectors', consulting: 'Consulting', tourism: 'Tourism', dev: 'Developers', contact: 'Contact', }, hero: { quote: '"Play" means a state of unrestrained freedom.', quoteSub: 'You will find that for everyone who truly knows how to play, their way of playing is unique, full of spontaneous creativity and distinct personality.', sectionTitle: 'To enable "Pure Play" for everyone, we focus on three pillars', }, cards: { consultingTitle: 'Step 1: Liberate Time', consultingDesc: 'First, we use AI to optimize enterprise workflows. Freeing people from tedious work gives them time to play.', consultingLink: 'View Solutions', tourismTitle: 'Step 2: Create Fun', tourismDesc: 'Then, we reshape tourism with tech. Check-in maps and gamification bring the fun back to travel.', tourismLink: 'View Cases', devTitle: 'Step 3: Support Creation', devDesc: 'Finally, we empower AI solopreneurs. Providing the infrastructure for every soul to build their dreams.', devLink: 'Get Resources' }, consulting: { tag: 'Consulting', title: 'Liberate from Chaos', titleHighlight: 'Return to Creation', description: 'We provide deep IT & AI consulting. Not to hustle harder, but to cut costs and increase efficiency, freeing teams from repetitive labor.', items: [ 'Private Knowledge Base (RAG)', 'Automated Research/Docs', 'AI Decision Support', 'Legacy IT Upgrade' ], reportTitle: 'Efficiency', reportDesc: 'AI automatically generates in-depth research reports, reducing a 3-day writing cycle to 15 minutes.' }, tourism: { tag: 'Cultural Tourism', title: 'Monetizing', titleHighlight: 'Tourism Assets', description: 'We launched a tourism operation solution centered on check-in maps, coupon distribution, and lucky draw games.', features: { map: { title: 'Check-in Map', desc: 'LBS unlock spots' }, coupon: { title: 'Coupons', desc: 'Connecting merchants' }, game: { title: 'Lucky Draw', desc: 'Boost retention' }, data: { title: 'CPS RevShare', desc: 'Earn by results' } }, mockup: { title: 'West Lake Hunt', gift: '🎁 Reward: Coffee', btn: 'Scan to Play' } }, dev: { tag: 'Infrastructure', title: 'Supporting Every', titleHighlight: 'Super Individual', description: 'For AI Solopreneurs, we provide infrastructure services, letting you build products like playing Lego.', features: { token: { title: 'Token Relay', desc: 'OpenAI / Claude / DeepSeek Aggregation' }, compute: { title: 'Elastic Compute', desc: 'Cost-effective GPU rental' }, saas: { title: 'SaaS Kit', desc: 'All-in-one scaffold' } } }, contact: { title: 'Keep in Touch', description: 'Since you are here, I will do my best to let you play purely.', formTitle: 'Send Email', placeholderName: 'Your Name', placeholderEmail: 'Your Email', submit: 'Send', footerLetter: 'Read: A Letter to Players', footerShareholder: 'Read: Letter to Shareholders (May 29, 2025)', footerNote: '"Pure Play" was co-founded by several shareholders. As the current legal representative, I have the final decision-making power.', copyright: '© 2026 Pure Play Technology Co., Ltd. Hangzhou.' } } }; const SimpleHome = () => { const [isMenuOpen, setIsMenuOpen] = useState(false); // Default to Light Mode (isDark = false) const [isDark, setIsDark] = useState(localStorage.getItem('theme') === 'dark'); // Sync theme on mount/change useEffect(() => { localStorage.setItem('theme', isDark ? 'dark' : 'light'); }, [isDark]); const [lang, setLang] = useState<'zh' | 'en'>(i18n.language?.startsWith('zh') ? 'zh' : 'en'); const [email, setEmail] = useState(''); const [status, setStatus] = useState<'idle' | 'loading' | 'success' | 'error'>('idle'); const [message, setMessage] = useState(''); const navigate = useNavigate(); const location = useLocation(); // Handle Hash Scroll on Mount/Update useEffect(() => { if (location.hash) { const id = location.hash.replace('#', ''); setTimeout(() => { const element = document.getElementById(id); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } }, 100); // Small delay to ensure render } }, [location]); // Handle global language sync if we want consistency with other pages using i18n // But SimpleHome seems to use local specific translations object `translations`. // Ideally SimpleHome should also use `useTranslation` hook so it shares state with Step1/Step2. // However, refactoring SimpleHome to use i18n completely is a big change (large file). // For now, let's at least make the Lang Toggle use the i18n instance if possible // OR just keep local lang state. The user asked to "perfect" Step1 and Step2. // If I change Lang in Step 1 (via i18n) and come back to Home, Home might still be default (zh). // Let's assume for now SimpleHome keeps its local state, but we try to initialize it from i18n if possible // or localStorage language detector. const t = translations[lang]; const scrollToSection = (id: string) => { const element = document.getElementById(id); if (element) { element.scrollIntoView({ behavior: 'smooth' }); setIsMenuOpen(false); } }; const toggleTheme = () => setIsDark(!isDark); const toggleLang = () => { const newLang = lang === 'zh' ? 'en' : 'zh'; setLang(newLang); i18n.changeLanguage(newLang); }; const handleEmailSubmit = async () => { if (!email) return; const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailRegex.test(email)) { setStatus('error'); setMessage('请输入有效的邮箱地址'); return; } setStatus('loading'); setMessage(''); try { const response = await fetch('/api/send-welcome-email', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ email }), }); const data = await response.json(); if (data.success) { setStatus('success'); setMessage(data.message); setEmail(''); } else { setStatus('error'); setMessage(data.message || '发送失败,请稍后重试'); } } catch (error) { console.error('API Error:', error); setStatus('error'); setMessage('网络错误,请稍后重试'); } }; return (
{t.hero.quote}
{t.hero.quoteSub}
{t.cards.consultingDesc}
{t.cards.consultingLink}{t.cards.tourismDesc}
{t.cards.tourismLink}{t.cards.devDesc}
{t.cards.devLink}{t.consulting.description}
{t.consulting.reportDesc}
{t.tourism.description}
{t.dev.description}
{t.dev.features.token.desc}
{t.dev.features.compute.desc}
{t.dev.features.saas.desc}
{t.contact.description}
{t.contact.footerNote}
{t.contact.copyright}