You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
719 B

<template>
<view>
<template v-if="list.length">
<u-list>
<u-list-item v-for="(item, index) in list" :key="index">
<u-cell :title="item.title" is-link :url="`/userPages/pages/article?id=${item.articleId}`" :label="item.createTime"></u-cell>
</u-list-item>
</u-list>
</template>
<u-empty v-else text="暂无文章"/>
</view>
</template>
<script>
import {listArticleReq} from "@/api/common";
export default {
name: "articleList",
data() {
return {
cateId: null,
list: []
}
},
methods: {
async getList() {
const {data} = await listArticleReq()
this.list = data
}
},
onLoad({id}) {
this.getList()
}
}
</script>