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.
84 lines
3.3 KiB
84 lines
3.3 KiB
<view class="page"> |
|
<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}}" |
|
> |
|
{{item.CateName}} |
|
</view> |
|
</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}} |
|
</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> |
|
<pagination wx:if="{{!CateId && !CateSecondId}}" pagination="{{pagination}}"></pagination> |
|
<block wx:elif="{{pagination.page >= pagination.pages}}"> |
|
<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}} |
|
</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> |
|
<pagination pagination="{{recommendPagination}}"></pagination> |
|
</block> |
|
</view>
|
|
|