|
@@ -7,7 +7,19 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<uni-list border class="list">
|
|
|
- <uni-list-item v-for="(item, index) in dataList" :key="index" :ellipsis="2" :title="item.title" link clickable @click="listItemBtn(item)" ></uni-list-item>
|
|
|
+ <uni-list-item
|
|
|
+ v-for="(item, index) in dataList"
|
|
|
+ :key="index"
|
|
|
+ :ellipsis="2"
|
|
|
+ :title="item.title"
|
|
|
+ :note="item.createTime"
|
|
|
+ showArrow
|
|
|
+ clickable
|
|
|
+ :thumb="item.blogPic"
|
|
|
+ thumb-size="lg"
|
|
|
+ @click="listItemBtn(item)"
|
|
|
+ />
|
|
|
+ <!-- <uni-list-item showArrow :thumb="item.blogPic" thumb-size="lg" :ellipsis="2" :title="item.title" link clickable @click="listItemBtn(item)" ></uni-list-item> -->
|
|
|
</uni-list>
|
|
|
<uni-load-more :status="more" />
|
|
|
</view>
|
|
@@ -15,6 +27,7 @@
|
|
|
|
|
|
<script>
|
|
|
import request from '../../api/cms.js';
|
|
|
+ import { BASE_URL } from '../../env.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -43,7 +56,9 @@
|
|
|
this.more = 'loading';
|
|
|
if(this.searchVal !== '') e.title = this.searchVal;
|
|
|
const res = await request.getArticleList({ pageNum: this.page, pageSize: this.size, ...e });
|
|
|
- this.dataList.push(...res.rows)
|
|
|
+ this.dataList.push(...res.rows.map(e => {
|
|
|
+ return { ...e, blogPic: BASE_URL.fileUrl + e.blogPic }
|
|
|
+ }))
|
|
|
// 根据总数 算页数 如果当前页 = 总页数就是没有数据 否则就是上拉加载
|
|
|
this.more = this.page >= Math.ceil(res.total / this.size) ? 'noMore' : 'more';
|
|
|
},
|