first commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<view class="min-height bg-main-light">
|
||||
<HeaderItem :title="title"/>
|
||||
<template v-if="list.length">
|
||||
<view class="card m-20" v-for="(item, index) in list" :key="index"
|
||||
@click="$jump(`/articlePages/pages/info?id=${item.articleId}`)">
|
||||
<view class="flex-1 flex justify-between items-center w-100p">
|
||||
<text class="text-25 font-bold">{{ item.title }}</text>
|
||||
<text class="text-20 text-gray">{{ item.createTime }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<u-empty v-else icon="/lawOrgPages/static/empty.png"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HeaderItem from "@/components/HeaderItem.vue";
|
||||
import {listArticleReq} from "@/api/common";
|
||||
|
||||
export default {
|
||||
name: "list",
|
||||
components: {HeaderItem},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
cateId: '',
|
||||
list: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
const {data} = await listArticleReq({
|
||||
categoryId: this.cateId
|
||||
})
|
||||
this.list = data
|
||||
}
|
||||
},
|
||||
onLoad({title, cateId}) {
|
||||
this.title = title
|
||||
this.cateId = cateId
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user