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"> - + - + - +