diff --git a/src/api/halo-base/comment.ts b/src/api/halo-base/comment.ts index a91040a..1932762 100644 --- a/src/api/halo-base/comment.ts +++ b/src/api/halo-base/comment.ts @@ -1,5 +1,6 @@ import { http } from '@/http/alova' -import type { Comment, CommentV1alpha1PublicApiCreateComment1Request, CommentV1alpha1PublicApiCreateReply1Request, CommentV1alpha1PublicApiGetCommentRequest, CommentV1alpha1PublicApiListCommentRepliesRequest, CommentV1alpha1PublicApiListComments1Request, CommentVoList, CommentWithReplyVoList, Reply, ReplyVoList } from '@halo-dev/api-client' +import type { Comment, CommentV1alpha1PublicApiCreateComment1Request, CommentV1alpha1PublicApiCreateReply1Request, CommentV1alpha1PublicApiGetCommentRequest, CommentV1alpha1PublicApiListCommentRepliesRequest, CommentV1alpha1PublicApiListComments1Request, CommentVoList, CommentWithReplyVo, Reply, ReplyVoList } from '@halo-dev/api-client' +import type { IHaloListResponseBase } from '../types/halo' const EndpointBase = '/apis/api.halo.run/v1alpha1/comments' @@ -35,7 +36,7 @@ export function createReply(data: CommentV1alpha1PublicApiCreateReply1Request) { * @returns 获取评论列表响应参数 */ export function listComments(params: CommentV1alpha1PublicApiListComments1Request) { - return http.Get(`${EndpointBase}`, { + return http.Get>(`${EndpointBase}`, { params, meta: { isHalo: true, diff --git a/src/components/post-detail/uh-post-comment-panel.vue b/src/components/post-detail/uh-post-comment-panel.vue new file mode 100644 index 0000000..b579413 --- /dev/null +++ b/src/components/post-detail/uh-post-comment-panel.vue @@ -0,0 +1,88 @@ + + + diff --git a/src/components/uh-gallery-panel/uh-gallery-panel.vue b/src/components/uh-gallery-panel/uh-gallery-panel.vue index 9fcbf22..2712a88 100644 --- a/src/components/uh-gallery-panel/uh-gallery-panel.vue +++ b/src/components/uh-gallery-panel/uh-gallery-panel.vue @@ -90,8 +90,8 @@ function handlePreview(item: IPhoto) { - - 加载失败,点击刷新试试 + + 加载失败,点击重试 数据已全部加载 diff --git a/src/subpkg-blog/post-detail/post-detail.vue b/src/subpkg-blog/post-detail/post-detail.vue index 5a2d5c2..933085b 100644 --- a/src/subpkg-blog/post-detail/post-detail.vue +++ b/src/subpkg-blog/post-detail/post-detail.vue @@ -153,6 +153,24 @@ onShareAppMessage(() => { path: `/subpkg-blog/post-detail/post-detail?metadataName=${postName}`, } }) + +const commentPanel = reactive<{ + show: boolean + post: PostVo | undefined +}>({ + show: false, + post: undefined, +}) + +function handleOpenCommentPanel(post: PostVo) { + commentPanel.show = true + commentPanel.post = post +} + +function handleCloseCommentPanel() { + commentPanel.show = false + commentPanel.post = undefined +}