Skip to content

Commit

Permalink
feat: add article list information
Browse files Browse the repository at this point in the history
  • Loading branch information
sd0ric4 committed Jan 28, 2023
1 parent a28e2c6 commit 5c39877
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
Binary file modified backend/.tmp/data.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
<<<<<<< Updated upstream
"x-generation-date": "2023-01-26T05:03:19.417Z"
=======
"x-generation-date": "2023-01-26T13:01:50.925Z"
>>>>>>> Stashed changes
"x-generation-date": "2023-01-28T12:44:42.318Z"
},
"x-strapi-config": {
"path": "/documentation",
Expand Down
12 changes: 7 additions & 5 deletions frontend/components/Aside/ArticleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ defineProps({
required: true,
},
})
tags = ['前端']
const { data: ArticleList } = await useFetch(`/api/articles/tags?tags=${tags}`)
</script>

<template>
Expand All @@ -14,23 +16,23 @@ defineProps({
相关文章
</div>
<div class="block-body">
<div v-for="item in articleList" :key="item.name" class="entry-list">
<div v-for="item in ArticleList" :key="item.name" class="entry-list">
<nuxt-link
href="/post/7181618141456236601" target="_blank" rel="" st:name="link" title="把ChatGPT配置到微信群里,可以对AI提问了!"
target="_blank" rel="" st:name="link" title="把ChatGPT配置到微信群里,可以对AI提问了!"
class="item"
>
<div class="entry-title">
把ChatGPT配置到微信群里,可以对AI提问了!
{{ item.title }}
</div>
<div class="entry-meta-box">
<div class="entry-meta">
30点赞
{{ item.liked }}
</div>
<div class="entry-meta">
&nbsp;·&nbsp;
</div>
<div class="entry-meta">
11评论
{{ item.commented }}
</div>
</div>
</nuxt-link>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Aside/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { data: GlobalData } = await useFetch('/api/global')
<AsideGadgets class="mb-5" :gadgets="GlobalData.gadgets" />
<AsideAuthorList class="sidebar-block mb-5" />
<AsideLinkList class="mb-5" :links="GlobalData.links" />
<!-- <AsideArticleList class="sidebar-block mb-5" /> -->
<AsideArticleList class="sidebar-block mb-5" />
<AsideFooters class="mb-5" />
<AsideSuspensionPanel class="fixed right-3 bottom-1" />
</div>
Expand Down

0 comments on commit 5c39877

Please sign in to comment.