mirror of
https://github.com/rumosky/mp-Blog.git
synced 2026-10-28 11:46:38 +08:00
83 lines
2.8 KiB
Plaintext
83 lines
2.8 KiB
Plaintext
<!--index.wxml-->
|
|
<view class="container">
|
|
<van-tabs
|
|
sticky
|
|
active="{{ active }}"
|
|
bind:change="onChange"
|
|
lazy-render
|
|
animated
|
|
swipeable
|
|
>
|
|
<van-tab wx:for="{{ categoryList }}" wx:key="index" title="{{ item.name }}">
|
|
<van-row gutter="20">
|
|
<van-col span="24">
|
|
<view class="count">
|
|
<van-icon
|
|
name="apps-o"
|
|
info="{{ categoryList[active].count }}"
|
|
/>分类 ⌊{{ categoryList[active].name }}⌉ 下的文章
|
|
</view>
|
|
</van-col>
|
|
<view>
|
|
<view wx:if="{{ showArticleList }}">
|
|
<van-col span="24" wx:for="{{ articleList }}" wx:key="index">
|
|
<view class="content">
|
|
<view class="content-title">
|
|
<h1>
|
|
<navigator
|
|
url="/pages/articleDetail/index?cid={{ item.cid }}"
|
|
hover-class="navigator-hover"
|
|
>{{ item.title }}</navigator
|
|
>
|
|
</h1>
|
|
</view>
|
|
<view class="content-meta">
|
|
<text class="fa fa-calendar" /> {{ item.date.year }}-{{
|
|
item.date.month
|
|
}}-{{ item.date.day }} |
|
|
<text class="fa fa-folder" />
|
|
{{ item.categories[0].name }} |
|
|
<text class="fa fa-comment" />
|
|
{{ item.commentsNum }}
|
|
</view>
|
|
<view class="content-abstract">
|
|
<navigator
|
|
url="/pages/articleDetail/index?cid={{ item.cid }}"
|
|
hover-class="navigator-hover"
|
|
>
|
|
{{ item.fields.excerpt.value }}</navigator
|
|
>
|
|
</view>
|
|
<view class="content-readmore">
|
|
<navigator
|
|
url="/pages/articleDetail/index?cid={{ item.cid }}"
|
|
hover-class="navigator-hover"
|
|
>
|
|
<view class="readmore-button">
|
|
<class class="fa fa-thumbs-up" /> 阅读更多
|
|
</view>
|
|
</navigator>
|
|
</view>
|
|
</view>
|
|
</van-col>
|
|
</view>
|
|
|
|
<view wx:else="{{ showArticleList }}">
|
|
<van-col span="24">
|
|
<van-empty
|
|
class="custom-image"
|
|
image="{{ imgURL }}"
|
|
description="{{ emptyContentText }}"
|
|
/>
|
|
</van-col>
|
|
</view>
|
|
</view>
|
|
<van-col span="24">
|
|
<view class="footer">Copyright © {{ currentYear }} 如默星空</view>
|
|
</van-col>
|
|
</van-row>
|
|
</van-tab>
|
|
</van-tabs>
|
|
<back-to-top scrollTop="{{ scrollTop }}" bind:backToTop="handleBackToTop" />
|
|
</view>
|