From fef163d7688d9d54c3cc11fb079cec2aae21b62e Mon Sep 17 00:00:00 2001 From: Cxx0822 <1556464090@qq.com> Date: Sun, 28 Sep 2025 18:43:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E6=97=B6=E6=8F=90=E7=A4=BA=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=92=8C=E7=B1=BB=E5=88=AB=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/blog.ts | 4 ++-- src/store/blog.ts | 8 +++++++- src/views/blog/article.vue | 8 ++++---- src/views/blog/detail[id].vue | 10 ++++------ vite.config.ts | 2 +- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/apis/blog.ts b/src/apis/blog.ts index 2057a32..46d40de 100644 --- a/src/apis/blog.ts +++ b/src/apis/blog.ts @@ -23,7 +23,7 @@ export const queryBlogByConditionApi = (query: IQueryBlog): Promise => export const queryBlogByIdApi = (id: number): Promise => cloudService({ - url: `/blog-api/blog/content/${id}`, + url: `/blog-api/blog/${id}/content`, method: 'get' }) @@ -47,7 +47,7 @@ export const queryLatestBlogApi = (): Promise => export const queryBlogCommentApi = (blogId: number): Promise => cloudService({ - url: `/blog-api/blog/comment/${blogId}`, + url: `/blog-api/blog/${blogId}/comment`, method: 'get' }) diff --git a/src/store/blog.ts b/src/store/blog.ts index acc0520..c725a6d 100644 --- a/src/store/blog.ts +++ b/src/store/blog.ts @@ -46,7 +46,13 @@ export const useBlogStore = defineStore('blog', { createTime: '', updateTime: '' } as IBlog, - newBlog: {} as INewBlog, + newBlog: { + title: '', + topValue: 1, + isGreat: false, + category: '', + content: '' + } as INewBlog, blogCategoryList: [] as IBlogCategory[], blogStats: {} as IBlogStats, latestBlogList: [] as IBlogLatest[], diff --git a/src/views/blog/article.vue b/src/views/blog/article.vue index 60075cb..d04e064 100644 --- a/src/views/blog/article.vue +++ b/src/views/blog/article.vue @@ -12,15 +12,15 @@ :row-style="tableRowStyle()" class="card-item"> - + - + - +