2026-02-04 11:36:19 +08:00
|
|
|
|
<!--pages/chapters/chapters.wxml-->
|
|
|
|
|
|
<!--Soul创业实验 - 目录页 1:1还原Web版本-->
|
|
|
|
|
|
<view class="page page-transition">
|
|
|
|
|
|
<!-- 自定义导航栏 -->
|
|
|
|
|
|
<view class="nav-bar" style="padding-top: {{statusBarHeight}}px;">
|
|
|
|
|
|
<view class="nav-content">
|
|
|
|
|
|
<view class="nav-left">
|
2026-03-17 13:17:49 +08:00
|
|
|
|
<view class="search-btn" wx:if="{{searchEnabled}}" bindtap="goToSearch">
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<icon name="search" size="32" color="rgba(255,255,255,0.6)" customClass="search-icon"></icon>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="nav-title brand-color">目录</view>
|
|
|
|
|
|
<view class="nav-right"></view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 导航栏占位 -->
|
|
|
|
|
|
<view class="nav-placeholder" style="height: {{statusBarHeight + 44}}px;"></view>
|
|
|
|
|
|
|
2026-03-18 12:56:34 +08:00
|
|
|
|
<!-- 目录骨架屏:加载中时展示 -->
|
|
|
|
|
|
<view class="parts-skeleton" wx:if="{{partsLoading}}">
|
|
|
|
|
|
<view class="skeleton-book-card">
|
|
|
|
|
|
<view class="skeleton-book-icon"></view>
|
|
|
|
|
|
<view class="skeleton-book-info">
|
|
|
|
|
|
<view class="skeleton-line skeleton-title"></view>
|
|
|
|
|
|
<view class="skeleton-line skeleton-subtitle"></view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="skeleton-count"></view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="skeleton-part-list">
|
|
|
|
|
|
<view class="skeleton-part-item" wx:for="{{[1,2,3,4,5]}}" wx:key="*this">
|
|
|
|
|
|
<view class="skeleton-part-header"></view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-03-17 11:44:36 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-03-23 18:38:23 +08:00
|
|
|
|
<!-- 书籍信息卡(点击折叠/展开除"每日派对干货"外的篇章) -->
|
|
|
|
|
|
<view class="book-info-card card-gradient" wx:if="{{!partsLoading}}" bindtap="toggleBookCollapse">
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<view class="book-icon">
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<view class="book-icon-inner"><icon name="book-open" size="56" color="#ffffff"></icon></view>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="book-info">
|
2026-03-23 18:38:23 +08:00
|
|
|
|
<text class="book-title">{{chaptersBookTitle}}</text>
|
|
|
|
|
|
<text class="book-subtitle">{{chaptersBookSubtitle}}</text>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
2026-03-23 18:38:23 +08:00
|
|
|
|
<view class="book-right-area">
|
|
|
|
|
|
<view class="book-count">
|
|
|
|
|
|
<text class="count-value brand-color">{{totalSections}}</text>
|
|
|
|
|
|
<text class="count-label">章节</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<text class="book-collapse-hint">{{bookCollapsed ? '展开 ▸' : '折叠 ▾'}}</text>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 目录内容 -->
|
2026-03-17 11:44:36 +08:00
|
|
|
|
<view class="chapters-content" wx:if="{{!partsLoading}}">
|
2026-03-14 18:04:05 +08:00
|
|
|
|
<!-- 序言(优先传 mid,阅读页用 by-mid 请求) -->
|
|
|
|
|
|
<view class="chapter-item" bindtap="goToRead" data-id="preface" data-mid="{{fixedSectionsMap.preface}}">
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<view class="item-left">
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<view class="item-icon icon-brand"><icon name="book-open" size="36" color="#00CED1"></icon></view>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<text class="item-title">序言|为什么我每天早上6点在Soul开播?</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item-right">
|
|
|
|
|
|
<text class="tag tag-free">免费</text>
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<icon name="chevron-right" size="28" color="rgba(255,255,255,0.4)" customClass="item-arrow"></icon>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 篇章列表 -->
|
|
|
|
|
|
<view class="part-list">
|
2026-03-23 18:38:23 +08:00
|
|
|
|
<view class="part-item" wx:for="{{bookData}}" wx:key="id" wx:if="{{!bookCollapsed || item.alwaysShow}}">
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<!-- 篇章标题 -->
|
|
|
|
|
|
<view class="part-header" bindtap="togglePart" data-id="{{item.id}}">
|
|
|
|
|
|
<view class="part-left">
|
2026-03-24 01:22:50 +08:00
|
|
|
|
<image wx:if="{{item.icon}}" class="part-icon-img" src="{{item.icon}}" mode="aspectFill"/>
|
|
|
|
|
|
<view wx:elif="{{item.iconEmoji}}" class="part-icon part-icon-emoji">{{item.iconEmoji}}</view>
|
2026-03-23 18:38:23 +08:00
|
|
|
|
<view wx:else class="part-icon">{{item.title[0] || '篇'}}</view>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<view class="part-info">
|
|
|
|
|
|
<text class="part-title">{{item.title}}</text>
|
|
|
|
|
|
<text class="part-subtitle">{{item.subtitle}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="part-right">
|
2026-03-14 18:04:05 +08:00
|
|
|
|
<text class="part-count">{{item.chapters.length || item.chapterCount}}章</text>
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<icon name="{{expandedPart === item.id ? 'chevron-down' : 'chevron-right'}}" size="28" color="rgba(255,255,255,0.4)" customClass="part-arrow"></icon>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-03-14 18:04:05 +08:00
|
|
|
|
<!-- 章节列表 - 展开时显示,懒加载 -->
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<block wx:if="{{expandedPart === item.id}}">
|
|
|
|
|
|
<view class="chapters-list">
|
2026-03-14 18:04:05 +08:00
|
|
|
|
<view wx:if="{{item.chapters.length === 0}}" class="chapters-loading">加载中...</view>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<block wx:for="{{item.chapters}}" wx:key="id" wx:for-item="chapter">
|
|
|
|
|
|
<view class="chapter-header">{{chapter.title}}</view>
|
|
|
|
|
|
<view class="section-list">
|
2026-03-22 08:34:28 +08:00
|
|
|
|
<block wx:for="{{chapter.sections}}" wx:key="id" wx:for-item="section" wx:for-index="secIdx">
|
|
|
|
|
|
<view class="section-item" wx:if="{{secIdx < chapter.sectionVisibleLimit}}" bindtap="goToRead" data-id="{{section.id}}" data-mid="{{section.mid}}">
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<view class="section-left">
|
2026-03-18 17:54:32 +08:00
|
|
|
|
<view class="section-lock-wrap">
|
|
|
|
|
|
<icon wx:if="{{section.isFree || isVip || (!section.isPremium && hasFullBook) || purchasedSections.indexOf(section.id) > -1}}" name="lock-open" size="24" color="#00CED1" customClass="section-lock lock-open"></icon>
|
|
|
|
|
|
<icon wx:else name="lock" size="24" color="rgba(255,255,255,0.3)" customClass="section-lock lock-closed"></icon>
|
|
|
|
|
|
</view>
|
2026-03-10 11:04:34 +08:00
|
|
|
|
<text class="section-title {{section.isFree || isVip || (!section.isPremium && hasFullBook) || purchasedSections.indexOf(section.id) > -1 ? '' : 'text-muted'}}">{{section.id}} {{section.title}}</text>
|
2026-02-28 15:16:23 +08:00
|
|
|
|
<text wx:if="{{section.isNew}}" class="tag tag-new">NEW</text>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="section-right">
|
|
|
|
|
|
<text wx:if="{{section.isFree}}" class="tag tag-free">免费</text>
|
2026-03-22 08:34:28 +08:00
|
|
|
|
<text wx:elif="{{!(isVip || (!section.isPremium && hasFullBook) || purchasedSections.indexOf(section.id) > -1)}}" class="section-price">¥{{section.price}}</text>
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<icon name="chevron-right" size="24" color="rgba(255,255,255,0.3)" customClass="section-arrow"></icon>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</block>
|
2026-03-22 08:34:28 +08:00
|
|
|
|
<view class="section-expand-trigger" wx:if="{{chapter.sections.length > chapter.sectionVisibleLimit}}" bindtap="expandSectionChapter" data-part-id="{{item.id}}" data-chapter-id="{{chapter.id}}">
|
|
|
|
|
|
<view class="latest-expand-triangle {{_triangleAnimating === chapter.id ? 'tri-bounce' : ''}}"></view>
|
|
|
|
|
|
</view>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</block>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</block>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-03-14 18:04:05 +08:00
|
|
|
|
<!-- 尾声(优先传 mid) -->
|
|
|
|
|
|
<view class="chapter-item" bindtap="goToRead" data-id="epilogue" data-mid="{{fixedSectionsMap.epilogue}}">
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<view class="item-left">
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<view class="item-icon icon-brand"><icon name="book-open" size="36" color="#00CED1"></icon></view>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
<text class="item-title">尾声|这本书的真实目的</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item-right">
|
|
|
|
|
|
<text class="tag tag-free">免费</text>
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<icon name="chevron-right" size="28" color="rgba(255,255,255,0.4)" customClass="item-arrow"></icon>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 附录 -->
|
|
|
|
|
|
<view class="appendix-card card">
|
|
|
|
|
|
<text class="appendix-title">附录</text>
|
|
|
|
|
|
<view class="appendix-list">
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="appendix-item"
|
|
|
|
|
|
wx:for="{{appendixList}}"
|
|
|
|
|
|
wx:key="id"
|
|
|
|
|
|
bindtap="goToRead"
|
|
|
|
|
|
data-id="{{item.id}}"
|
2026-03-14 18:04:05 +08:00
|
|
|
|
data-mid="{{item.mid}}"
|
2026-02-04 11:36:19 +08:00
|
|
|
|
>
|
|
|
|
|
|
<text class="appendix-text">{{item.title}}</text>
|
2026-03-18 17:01:26 +08:00
|
|
|
|
<icon name="chevron-right" size="24" color="rgba(255,255,255,0.3)" customClass="appendix-arrow"></icon>
|
2026-02-04 11:36:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 底部留白 -->
|
|
|
|
|
|
<view class="bottom-space"></view>
|
|
|
|
|
|
</view>
|