更新小程序配置,重构页面结构,删除不再使用的地址管理和章节页面,优化项目结构以提升可维护性;调整全局样式,增强组件的可复用性和一致性。
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
<view class="page">
|
||||
<view class="nav-placeholder" style="height: {{navBarHeight || (statusBarHeight + 44)}}px;"></view>
|
||||
<view class="header">
|
||||
<view class="header-inner safe-header-right">
|
||||
<view class="header-placeholder"></view>
|
||||
<text class="header-title">目录</text>
|
||||
<view class="header-btn" bindtap="goToSearch">🔍</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="book-card">
|
||||
<view class="book-icon">📖</view>
|
||||
<view class="book-info">
|
||||
<text class="book-title">一场SOUL的创业实验场</text>
|
||||
<text class="book-desc">来自Soul派对房的真实商业故事</text>
|
||||
</view>
|
||||
<view class="book-stat">
|
||||
<text class="book-num">{{totalSections}}</text>
|
||||
<text class="book-label">章节</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="preface-row" bindtap="goToRead" data-id="preface">
|
||||
<view class="preface-left">
|
||||
<view class="preface-icon">📄</view>
|
||||
<text class="preface-text">序言|为什么我每天早上6点在Soul开播?</text>
|
||||
</view>
|
||||
<text class="tag-free">免费</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
|
||||
<view class="parts" wx:for="{{bookData}}" wx:key="id">
|
||||
<view class="part-head" data-id="{{item.id}}" bindtap="togglePart">
|
||||
<view class="part-left">
|
||||
<view class="part-num">{{item.number}}</view>
|
||||
<view class="part-info">
|
||||
<text class="part-title">{{item.title}}</text>
|
||||
<text class="part-subtitle">{{item.subtitle}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="part-count">{{item.sectionCount != null ? item.sectionCount : (item.chapters && item.chapters.length)}}章</text>
|
||||
<text class="arrow {{expandedPart === item.id ? 'expanded' : ''}}">›</text>
|
||||
</view>
|
||||
<view class="part-body" wx:if="{{expandedPart === item.id}}">
|
||||
<view class="chapter-block" wx:for="{{item.chapters}}" wx:for-item="ch" wx:key="id">
|
||||
<view class="chapter-title">{{ch.title}}</view>
|
||||
<view
|
||||
class="section-row"
|
||||
wx:for="{{ch.sections}}"
|
||||
wx:for-item="sec"
|
||||
wx:key="id"
|
||||
bindtap="goToRead"
|
||||
data-id="{{sec.id}}"
|
||||
>
|
||||
<text class="section-lock">{{sec.isFree || (hasFullBook || (purchasedSections && purchasedSections.indexOf(sec.id) >= 0)) ? '✓' : '🔒'}}</text>
|
||||
<text class="section-text {{sec.isFree || (hasFullBook || (purchasedSections && purchasedSections.indexOf(sec.id) >= 0)) ? '' : 'locked'}}">{{sec.id}} {{sec.title}}</text>
|
||||
<text class="section-tag" wx:if="{{sec.isFree}}">免费</text>
|
||||
<text class="section-tag purchased" wx:elif="{{hasFullBook || (purchasedSections && purchasedSections.indexOf(sec.id) >= 0)}}">已购</text>
|
||||
<text class="section-price" wx:else>¥{{sec.price}}</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="preface-row" bindtap="goToRead" data-id="epilogue">
|
||||
<view class="preface-left">
|
||||
<view class="preface-icon">📄</view>
|
||||
<text class="preface-text">尾声|这本书的真实目的</text>
|
||||
</view>
|
||||
<text class="tag-free">免费</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
|
||||
<view class="appendix-block">
|
||||
<text class="appendix-label">附录</text>
|
||||
<view class="appendix-item" wx:for="{{appendixList}}" wx:key="id" bindtap="goToRead" data-id="{{item.id}}">
|
||||
<text class="appendix-title">{{item.title}}</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom-space"></view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user