45 lines
1.1 KiB
Vue
45 lines
1.1 KiB
Vue
<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> |