65 lines
1.9 KiB
Vue
65 lines
1.9 KiB
Vue
<template>
|
|
<view>
|
|
<u-sticky offset-top="0" customNavHeight="0">
|
|
<!-- 顶部 -->
|
|
<uititle title="文章列表"></uititle>
|
|
</u-sticky>
|
|
<view class="p-40">
|
|
<view v-for="(item, index) in list" :key="index"
|
|
@click="navTo(item._id)"
|
|
class="p-30 border-bottom flex justify-start flex-col items-start bg-white">
|
|
<text class="font-bold">{{ item.name }}</text>
|
|
<text class="text-gray">{{ item._add_time_str }}</text>
|
|
</view>
|
|
<!-- <view class="text-center">-->
|
|
<!-- <el-pagination-->
|
|
<!-- :page-size="pageSize"-->
|
|
<!-- @current-change="getList"-->
|
|
<!-- background-->
|
|
<!-- layout="prev, pager, next"-->
|
|
<!-- :total="total">-->
|
|
<!-- </el-pagination>-->
|
|
<!-- </view>-->
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import uititle from "@/components/common/title.vue";
|
|
|
|
export default {
|
|
name: "list",
|
|
components: {uititle},
|
|
data() {
|
|
return {
|
|
list: [],
|
|
parentId: null,
|
|
pageSize: 500,
|
|
total: 0,
|
|
}
|
|
},
|
|
methods: {
|
|
getList(pageIndex) {
|
|
vk.callFunction({
|
|
url: 'client/otherArticle/list/pub/getList',
|
|
pageSize: this.pageSize,
|
|
pageIndex,
|
|
data: {
|
|
parentId: this.parentId
|
|
},
|
|
success: res => {
|
|
this.list = res.rows;
|
|
this.total = res.total;
|
|
}
|
|
})
|
|
},
|
|
navTo(id) {
|
|
vk.navigateTo(`/pages/article/info?id=${id}`)
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
if (options) this.parentId = options.id;
|
|
this.getList();
|
|
}
|
|
}
|
|
</script> |