diff --git a/src/apis/blog.ts b/src/apis/blog.ts index e205121..40a7546 100644 --- a/src/apis/blog.ts +++ b/src/apis/blog.ts @@ -30,7 +30,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' }) @@ -54,13 +54,13 @@ 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' }) -export const addBlogCommentApi = (blogComment: IBlogComment): Promise => +export const addBlogCommentApi = (blogId: number, blogComment: IBlogComment): Promise => cloudService({ - url: '/blog-api/blog/comment', + url: `/blog-api/blog/${blogId}/comment`, method: 'put', data: blogComment }) diff --git a/src/assets/font/custom.ttf b/src/assets/font/custom.ttf deleted file mode 100644 index 2ca97e8..0000000 Binary files a/src/assets/font/custom.ttf and /dev/null differ diff --git a/src/assets/font/custom.woff2 b/src/assets/font/custom.woff2 new file mode 100644 index 0000000..cca851d Binary files /dev/null and b/src/assets/font/custom.woff2 differ diff --git a/src/components/Comment/BlogCommentEdit.vue b/src/components/Comment/BlogCommentEdit.vue index ef79107..f3c946d 100644 --- a/src/components/Comment/BlogCommentEdit.vue +++ b/src/components/Comment/BlogCommentEdit.vue @@ -82,15 +82,14 @@ const onSelectEmoji = (emoji) => { const sendCommentClick = async () => { blogComment.value.parentId = props.parentId - blogComment.value.blogId = blogStore.currentBlogId if (!blogComment.value.name) { blogComment.value.name = 'Anonymous' } - await blogStore.addBlogComment(blogComment.value) + await blogStore.addBlogComment(blogStore.currentBlogId, blogComment.value) blogComment.value = deepCopyObject(blogStore.getEmptyBlogComment()) - blogStore.isShowBlogCommentEdit = false + blogStore.isShowCommentEdit = false } diff --git a/src/components/Comment/BlogCommentItem.vue b/src/components/Comment/BlogCommentItem.vue index 4ad73dd..6526b62 100644 --- a/src/components/Comment/BlogCommentItem.vue +++ b/src/components/Comment/BlogCommentItem.vue @@ -12,7 +12,7 @@
{{ props.comment.createTime }} - 回复 取消 @@ -20,7 +20,7 @@

{{ props.comment.content }}

-
@@ -49,7 +49,7 @@