"use client" import { useState } from "react" import { useRouter } from "next/navigation" import { ChevronRight, Lock, Unlock, Book, BookOpen, Home, List, Sparkles, User, Users, Zap, Crown } from "lucide-react" import { useStore } from "@/lib/store" import { bookData, getTotalSectionCount, specialSections, getPremiumBookPrice, getExtraSectionsCount, BASE_SECTIONS_COUNT } from "@/lib/book-data" export default function ChaptersPage() { const router = useRouter() const { user, hasPurchased } = useStore() const [expandedPart, setExpandedPart] = useState("part-1") const [bookVersion, setBookVersion] = useState<"basic" | "premium">("basic") const [showPremiumTab, setShowPremiumTab] = useState(false) // 控制是否显示最新完整版标签 const totalSections = getTotalSectionCount() const hasFullBook = user?.hasFullBook || false const premiumPrice = getPremiumBookPrice() const extraSections = getExtraSectionsCount() const handleSectionClick = (sectionId: string) => { router.push(`/read/${sectionId}`) } return (

目录

一场SOUL的创业实验场

来自Soul派对房的真实商业故事

{totalSections}
章节
{/* 版本标签切换 - 仅在showPremiumTab为true时显示 */} {showPremiumTab && extraSections > 0 && (
)} {/* 目录内容 */}
{bookData.map((part) => (
{expandedPart === part.id && (
{part.chapters.map((chapter) => (
{chapter.title}
{chapter.sections.map((section) => { const isPurchased = hasFullBook || hasPurchased(section.id) const canRead = section.isFree || isPurchased return ( ) })}
))}
)}
))} {/* 附录 */}
附录
{specialSections.appendix.map((item) => ( ))}
) }