/** * 一场SOUL的创业实验 - 首页 * 开发: 卡若 * 技术支持: 存客宝 */ "use client" import { useState, useEffect } from "react" import { useRouter } from "next/navigation" import { Search, ChevronRight, BookOpen, Home, List, User, Users } from "lucide-react" import { useStore } from "@/lib/store" import { bookData, getTotalSectionCount } from "@/lib/book-data" import { SearchModal } from "@/components/search-modal" export default function HomePage() { const router = useRouter() const { user } = useStore() const [mounted, setMounted] = useState(false) const [searchOpen, setSearchOpen] = useState(false) const totalSections = getTotalSectionCount() const hasFullBook = user?.hasFullBook || false const purchasedCount = hasFullBook ? totalSections : user?.purchasedSections?.length || 0 useEffect(() => { setMounted(true) }, []) // 推荐章节 const featuredSections = [ { id: "1.1", title: "荷包:电动车出租的被动收入模式", tag: "免费", part: "真实的人" }, { id: "3.1", title: "3000万流水如何跑出来", tag: "热门", part: "真实的行业" }, { id: "8.1", title: "流量杠杆:抖音、Soul、飞书", tag: "推荐", part: "真实的赚钱" }, ] // 最新更新 const latestSection = { id: "9.14", title: "大健康私域:一个月150万的70后", part: "真实的赚钱", } if (!mounted) { return null } return (
{/* 顶部区域 */}
S

Soul创业实验

来自派对房的真实故事

{totalSections}章
{/* 搜索栏 */}
setSearchOpen(true)} className="flex items-center gap-3 px-4 py-3 rounded-xl bg-[#1c1c1e] border border-white/5 cursor-pointer hover:border-[#00CED1]/30 transition-colors" > 搜索章节...
{/* 搜索弹窗 */}
{/* Banner卡片 - 最新章节 */}
router.push(`/read/${latestSection.id}`)} className="relative p-5 rounded-2xl overflow-hidden cursor-pointer" style={{ background: "linear-gradient(135deg, #0d3331 0%, #1a1a2e 50%, #16213e 100%)", }} >
最新更新

{latestSection.title}

{latestSection.part}

开始阅读
{/* 阅读进度卡 */}

我的阅读

{purchasedCount}/{totalSections}章

{purchasedCount}

已读

{totalSections - purchasedCount}

待读

5

篇章

11

章节

{/* 精选推荐 */}

精选推荐

{featuredSections.map((section) => (
router.push(`/read/${section.id}`)} className="p-4 rounded-xl bg-[#1c1c1e] border border-white/5 cursor-pointer active:scale-[0.98] transition-transform" >
{section.id} {section.tag}

{section.title}

{section.part}

))}

内容概览

{bookData.map((part) => (
router.push("/chapters")} className="p-4 rounded-xl bg-[#1c1c1e] border border-white/5 cursor-pointer active:scale-[0.98] transition-transform" >
{part.number}

{part.title}

{part.subtitle}

))}
{/* 序言入口 */}
router.push("/read/preface")} className="p-4 rounded-xl bg-gradient-to-r from-[#00CED1]/10 to-transparent border border-[#00CED1]/20 cursor-pointer" >

序言

为什么我每天早上6点在Soul开播?

免费
) }