65 lines
2.5 KiB
Plaintext
65 lines
2.5 KiB
Plaintext
<view class="notes-page">
|
|
<!-- 顶部导航 -->
|
|
<view class="nav-bar">
|
|
<view class="nav-item {{activeTab === 'notes' ? 'active' : ''}}"
|
|
bindtap="switchTab" data-tab="notes">笔记</view>
|
|
<view class="nav-item {{activeTab === 'bookmarks' ? 'active' : ''}}"
|
|
bindtap="switchTab" data-tab="bookmarks">书签</view>
|
|
</view>
|
|
|
|
<!-- 笔记列表 -->
|
|
<view class="notes-list" wx:if="{{activeTab === 'notes'}}">
|
|
<block wx:if="{{notes.length > 0}}">
|
|
<view class="note-item" wx:for="{{notes}}" wx:key="time">
|
|
<view class="note-header">
|
|
<text class="book-title">{{item.bookTitle}}</text>
|
|
<text class="chapter">第{{item.chapter}}章</text>
|
|
</view>
|
|
<view class="note-content">
|
|
<text class="selected-text">{{item.selectedText}}</text>
|
|
<text class="note-text">{{item.content}}</text>
|
|
</view>
|
|
<view class="note-footer">
|
|
<text class="time">{{item.time}}</text>
|
|
<view class="actions">
|
|
<text class="action" bindtap="editNote" data-note="{{item}}">编辑</text>
|
|
<text class="action" bindtap="deleteNote" data-note="{{item}}">删除</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<view class="empty-state" wx:else>
|
|
<text>暂无笔记</text>
|
|
<text class="tip">阅读时长按文字添加笔记</text>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 书签列表 -->
|
|
<view class="bookmarks-list" wx:if="{{activeTab === 'bookmarks'}}">
|
|
<block wx:if="{{bookmarks.length > 0}}">
|
|
<view class="bookmark-item" wx:for="{{bookmarks}}" wx:key="time">
|
|
<view class="bookmark-header">
|
|
<text class="book-title">{{item.bookTitle}}</text>
|
|
<text class="chapter">第{{item.chapter}}章</text>
|
|
</view>
|
|
<view class="bookmark-content">{{item.content}}</view>
|
|
<view class="bookmark-footer">
|
|
<text class="time">{{item.time}}</text>
|
|
<view class="actions">
|
|
<text class="action" bindtap="jumpToBookmark" data-bookmark="{{item}}">跳转</text>
|
|
<text class="action" bindtap="deleteBookmark" data-bookmark="{{item}}">删除</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<view class="empty-state" wx:else>
|
|
<text>暂无书签</text>
|
|
<text class="tip">阅读时点击右上角添加书签</text>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 添加按钮 -->
|
|
<view class="add-btn" bindtap="navigateToReader">
|
|
<text class="plus">+</text>
|
|
</view>
|
|
</view> |