57 lines
1.9 KiB
Plaintext
57 lines
1.9 KiB
Plaintext
|
|
<!-- 分类页面 -->
|
||
|
|
<view class="container">
|
||
|
|
<!-- 左侧分类列表 -->
|
||
|
|
<scroll-view class="category-sidebar" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||
|
|
<view class="category-item {{currentCategory === item.id ? 'active' : ''}}"
|
||
|
|
wx:for="{{categories}}"
|
||
|
|
wx:key="id"
|
||
|
|
bindtap="selectCategory"
|
||
|
|
data-id="{{item.id}}">
|
||
|
|
<view class="category-indicator" wx:if="{{currentCategory === item.id}}"></view>
|
||
|
|
<text class="category-name">{{item.name}}</text>
|
||
|
|
<text class="category-e-name">{{item.e_name}}</text>
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
|
||
|
|
<!-- 右侧内容区 -->
|
||
|
|
<scroll-view class="content-area"
|
||
|
|
scroll-y="{{true}}"
|
||
|
|
enhanced="{{true}}"
|
||
|
|
show-scrollbar="{{false}}"
|
||
|
|
bindscrolltolower="loadMore">
|
||
|
|
<!-- 分类标题 -->
|
||
|
|
<view class="content-header">
|
||
|
|
<text class="content-title">{{currentCategoryName}}</text>
|
||
|
|
<text class="content-count">共{{total}}个练习表</text>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 练习表网格 -->
|
||
|
|
<view class="worksheet-grid">
|
||
|
|
<view class="worksheet-item"
|
||
|
|
wx:for="{{worksheets}}"
|
||
|
|
wx:key="id"
|
||
|
|
bindtap="goDetail"
|
||
|
|
data-id="{{item.id}}">
|
||
|
|
<view class="worksheet-cover">
|
||
|
|
<image class="cover-img" src="{{dataBaseUrl}}{{item.coverurl}}" mode="aspectFill" lazy-load="{{true}}"></image>
|
||
|
|
</view>
|
||
|
|
<view class="worksheet-info">
|
||
|
|
<text class="worksheet-title text-ellipsis-2">{{item.title}}</text>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 加载状态 -->
|
||
|
|
<view class="load-status">
|
||
|
|
<text wx:if="{{loading}}">加载中...</text>
|
||
|
|
<text wx:elif="{{!hasMore && worksheets.length > 0}}">已加载全部</text>
|
||
|
|
</view>
|
||
|
|
|
||
|
|
<!-- 空状态 -->
|
||
|
|
<view class="empty-tip" wx:if="{{!loading && worksheets.length === 0}}">
|
||
|
|
|
||
|
|
<text>暂无练习表</text>
|
||
|
|
</view>
|
||
|
|
</scroll-view>
|
||
|
|
</view>
|