From a65ab0a86a2bfd90525fb3ecf9cf3909984995f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=91=E8=BD=BB=E7=8B=82?= <1677568218@qq.com> Date: Sun, 29 Jan 2023 21:30:49 +0800 Subject: [PATCH] fix: tags api --- .gitignore | 1 + .../1.0.0/full_documentation.json | 2 +- frontend/components/Aside/ArticleList.vue | 5 ++- frontend/server/api/articles/[id].ts | 2 +- frontend/server/api/articles/columns/[id].ts | 2 +- frontend/server/api/articles/list.ts | 2 +- frontend/server/api/articles/tags.ts | 2 +- frontend/server/api/authors/list.ts | 2 +- frontend/server/api/global/index.ts | 2 +- frontend/server/api/global/navs.ts | 2 +- frontend/server/api/global/types.ts | 2 +- frontend/{composables => utils}/useGraphql.ts | 40 +++++++++++-------- 12 files changed, 37 insertions(+), 27 deletions(-) rename frontend/{composables => utils}/useGraphql.ts (61%) diff --git a/.gitignore b/.gitignore index 1aa570d..510097f 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,4 @@ dist .tern-port .vercel frontend/.env +backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json diff --git a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 12f1e90..3ceec47 100644 --- a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2023-01-28T14:10:48.649Z" + "x-generation-date": "2023-01-29T12:28:39.928Z" }, "x-strapi-config": { "path": "/documentation", diff --git a/frontend/components/Aside/ArticleList.vue b/frontend/components/Aside/ArticleList.vue index 0f4e8ff..2bd3286 100644 --- a/frontend/components/Aside/ArticleList.vue +++ b/frontend/components/Aside/ArticleList.vue @@ -5,8 +5,9 @@ defineProps({ required: true, }, }) -tags = ['前端'] -const { data: ArticleList } = await useFetch(`/api/articles/tags?tags=${tags}&authorId=${item.authorId}`) +const tags = ['前端'] +const authorId = '5' +const { data: ArticleList } = await useFetch(`/api/articles/tags?tags=${JSON.stringify(tags)}&authorId=${authorId}`)