You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
3.9 KiB
101 lines
3.9 KiB
<view class="page"> |
|
<scroll-view class="scroll" scroll-x scroll-into-view="{{scrollIntoView}}"> |
|
<view class="nav"> |
|
<view class="nav-item {{!CateId && 'active'}}" bind:tap="handleCate">全部</view> |
|
<view |
|
class="nav-item {{CateId=== item.Id &&'active'}}" |
|
wx:for="{{cateList}}" |
|
wx:key="Id" |
|
bind:tap="handleCate" |
|
data-index="{{index}}" |
|
id="nav-item{{item.Id}}" |
|
> |
|
{{item.CateName}} |
|
</view> |
|
</view> |
|
</scroll-view> |
|
<view class="types" wx:if="{{CateId && cateSecondList.length}}"> |
|
<view class="type {{!CateSecondId && 'active'}}" bind:tap="handleSecondCate">全部</view> |
|
<view |
|
class="type {{CateSecondId=== item.Id && 'active'}}" |
|
wx:for="{{cateSecondList}}" |
|
wx:key="Id" |
|
bind:tap="handleSecondCate" |
|
data-index="{{index}}" |
|
> |
|
{{item.CateName}} |
|
</view> |
|
</view> |
|
<view class="card" wx:for="{{list}}" wx:key="Id" data-id="{{item.Id}}" bind:tap="handleDetail"> |
|
<image class="photo" mode="aspectFill" src="{{item.CoverUrl}}"></image> |
|
<view class="c-container"> |
|
<view class="title">{{item.BookName}}</view> |
|
<view class="type">{{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}}</view> |
|
<view class="stat"> |
|
<view class="s-item"> |
|
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image> |
|
{{item.BrowseNum || 0}} |
|
</view> |
|
<view |
|
class="s-item active" |
|
wx:if="{{item.IsCollect === '1'}}" |
|
catch:tap="handleUnCollect" |
|
data-index="{{index}}" |
|
data-list="list" |
|
> |
|
<image class="icon" src="{{imageUrl}}icon-collection-active.png?t={{Timestamp}}"></image> |
|
已收藏 |
|
</view> |
|
<view class="s-item" wx:else catch:tap="handleCollect" data-index="{{index}}" data-list="list"> |
|
<image class="icon" src="{{imageUrl}}icon-collection.png?t={{Timestamp}}"></image> |
|
收藏 |
|
</view> |
|
</view> |
|
</view> |
|
</view> |
|
<block wx:if="{{pagination.page >= pagination.pages}}"> |
|
<view class="der" wx:if="{{recommendList.length}}">— — 以下为本分类下其他内容 — —</view> |
|
<view class="card" wx:for="{{recommendList}}" wx:key="Id" bind:tap="handleDetail" data-id="{{item.Id}}"> |
|
<image class="photo" mode="aspectFill" src="{{item.CoverUrl}}"></image> |
|
<view class="c-container"> |
|
<view class="title">{{item.BookName}}</view> |
|
<view class="type">{{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}}</view> |
|
<view class="stat"> |
|
<view class="s-item"> |
|
<image class="icon" src="{{imageUrl}}icon-eye.png?t={{Timestamp}}"></image> |
|
{{item.BrowseNum || 0}} |
|
</view> |
|
<view |
|
class="s-item active" |
|
wx:if="{{item.IsCollect === '1'}}" |
|
catch:tap="handleUnCollect" |
|
data-index="{{index}}" |
|
data-list="recommendList" |
|
> |
|
<image class="icon" src="{{imageUrl}}icon-collection-active.png?t={{Timestamp}}"></image> |
|
已收藏 |
|
</view> |
|
<view class="s-item" wx:else catch:tap="handleCollect" data-index="{{index}}" data-list="recommendList"> |
|
<image class="icon" src="{{imageUrl}}icon-collection.png?t={{Timestamp}}"></image> |
|
收藏 |
|
</view> |
|
</view> |
|
</view> |
|
</view> |
|
</block> |
|
<view class="pagintion"> |
|
<image |
|
class="none" |
|
src="{{imageUrl}}none.png?t={{Timestamp}}" |
|
wx:if="{{pagination.count==0 && recommendPagination.count===0}}" |
|
></image> |
|
<van-divider |
|
contentPosition="center" |
|
wx:elif="{{pagination.page<pagination.pages || recommendPagination.page < recommendPagination.pages}}" |
|
> |
|
<van-loading /> |
|
加载中... |
|
</van-divider> |
|
<van-divider contentPosition="center" wx:else>没有更多了</van-divider> |
|
</view> |
|
</view>
|
|
|