主要更新: 1. 按H5网页端完全重构匹配功能(match页面) - 4种匹配类型: 创业合伙/资源对接/导师顾问/团队招募 - 资源对接等类型弹出手机号/微信号输入框 - 去掉重新匹配按钮,改为返回按钮 2. 修复所有卡片对齐和宽度问题 - 目录页附录卡片居中 - 首页阅读进度卡片满宽度 - 我的页面菜单卡片对齐 - 推广中心分享卡片统一宽度 3. 修复目录页图标和文字对齐 - section-icon固定40rpx宽高 - section-title与图标垂直居中 4. 更新真实完整文章标题(62篇) - 从book目录读取真实markdown文件名 - 替换之前的简化标题 5. 新增文章数据API - /api/db/chapters - 获取完整书籍结构 - 支持按ID获取单篇文章内容
126 lines
4.9 KiB
Plaintext
126 lines
4.9 KiB
Plaintext
<!--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-title brand-color">目录</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 导航栏占位 -->
|
||
<view class="nav-placeholder" style="height: {{statusBarHeight + 44}}px;"></view>
|
||
|
||
<!-- 书籍信息卡 -->
|
||
<view class="book-info-card card-gradient">
|
||
<view class="book-icon">
|
||
<view class="book-icon-inner">📚</view>
|
||
</view>
|
||
<view class="book-info">
|
||
<text class="book-title">一场SOUL的创业实验场</text>
|
||
<text class="book-subtitle">来自Soul派对房的真实商业故事</text>
|
||
</view>
|
||
<view class="book-count">
|
||
<text class="count-value brand-color">{{totalSections}}</text>
|
||
<text class="count-label">章节</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 目录内容 -->
|
||
<view class="chapters-content">
|
||
<!-- 序言 -->
|
||
<view class="chapter-item" bindtap="goToRead" data-id="preface">
|
||
<view class="item-left">
|
||
<view class="item-icon icon-brand">📖</view>
|
||
<text class="item-title">序言|为什么我每天早上6点在Soul开播?</text>
|
||
</view>
|
||
<view class="item-right">
|
||
<text class="tag tag-free">免费</text>
|
||
<text class="item-arrow">→</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 篇章列表 -->
|
||
<view class="part-list">
|
||
<view class="part-item" wx:for="{{bookData}}" wx:key="id">
|
||
<!-- 篇章标题 -->
|
||
<view class="part-header" bindtap="togglePart" data-id="{{item.id}}">
|
||
<view class="part-left">
|
||
<view class="part-icon">{{item.number}}</view>
|
||
<view class="part-info">
|
||
<text class="part-title">{{item.title}}</text>
|
||
<text class="part-subtitle">{{item.subtitle}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="part-right">
|
||
<text class="part-count">{{item.chapters.length}}章</text>
|
||
<text class="part-arrow {{expandedPart === item.id ? 'arrow-down' : ''}}">→</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 章节列表 - 展开时显示 -->
|
||
<block wx:if="{{expandedPart === item.id}}">
|
||
<view class="chapters-list">
|
||
<block wx:for="{{item.chapters}}" wx:key="id" wx:for-item="chapter">
|
||
<view class="chapter-header">{{chapter.title}}</view>
|
||
<view class="section-list">
|
||
<block wx:for="{{chapter.sections}}" wx:key="id" wx:for-item="section">
|
||
<view class="section-item" bindtap="goToRead" data-id="{{section.id}}">
|
||
<view class="section-left">
|
||
<view class="section-icon {{section.isFree || hasFullBook || purchasedSections.indexOf(section.id) > -1 ? 'icon-unlocked' : 'icon-locked'}}">
|
||
<text wx:if="{{section.isFree || hasFullBook || purchasedSections.indexOf(section.id) > -1}}">🔓</text>
|
||
<text wx:else>🔒</text>
|
||
</view>
|
||
<text class="section-title {{section.isFree || hasFullBook || purchasedSections.indexOf(section.id) > -1 ? '' : 'text-muted'}}">
|
||
{{section.id}} {{section.title}}
|
||
</text>
|
||
</view>
|
||
<view class="section-right">
|
||
<text wx:if="{{section.isFree}}" class="tag tag-free">免费</text>
|
||
<text wx:elif="{{hasFullBook || purchasedSections.indexOf(section.id) > -1}}" class="text-brand text-xs">已购</text>
|
||
<text wx:else class="text-muted text-xs">¥{{section.price}}</text>
|
||
<text class="section-arrow">→</text>
|
||
</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 尾声 -->
|
||
<view class="chapter-item" bindtap="goToRead" data-id="epilogue">
|
||
<view class="item-left">
|
||
<view class="item-icon icon-brand">📖</view>
|
||
<text class="item-title">尾声|这本书的真实目的</text>
|
||
</view>
|
||
<view class="item-right">
|
||
<text class="tag tag-free">免费</text>
|
||
<text class="item-arrow">→</text>
|
||
</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}}"
|
||
>
|
||
<text class="appendix-text">{{item.title}}</text>
|
||
<text class="appendix-arrow">→</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 底部留白 -->
|
||
<view class="bottom-space"></view>
|
||
</view>
|