import { request } from "@/utils/request"; /** 获取动态列表 */ export const getPosts = ( params: NetParams.PostGetPosts ): Promise => { return request({ method: "get", url: "/v1/posts", params, }); }; /** 获取标签列表 */ export const getTags = ( params: NetParams.PostGetTags ): Promise => { return request({ method: "get", url: "/v1/tags", params, }); }; /** 获取动态详情 */ export const getPost = ( params: NetParams.PostGetPost ): Promise => { return request({ method: "get", url: "/v1/post", params, }); }; /** 获取动态点赞状态 */ export const getPostStar = ( params: NetParams.PostPostStar ): Promise => { return request({ method: "get", url: "/v1/post/star", params, }); }; /** 动态点赞 */ export const postStar = ( data: NetParams.PostPostStar ): Promise => { return request({ method: "post", url: "/v1/post/star", data, }); }; /** 获取动态收藏状态 */ export const getPostCollection = ( params: NetParams.PostGetPostCollection ): Promise => { return request({ method: "get", url: "/v1/post/collection", params, }); }; /** 动态收藏 */ export const postCollection = ( data: NetParams.PostPostCollection ): Promise => { return request({ method: "post", url: "/v1/post/collection", data, }); }; /** 获取动态评论列表 */ export const getPostComments = ( params: NetParams.PostGetPostComments ): Promise => { return request({ method: "get", url: "/v1/post/comments", params, }); }; /** 获取联系人列表 */ export const getContacts = ( params: NetParams.GetContacts ): Promise => { return request({ method: "get", url: "/v1/user/contacts", params, }); }; /** 发布动态 */ export const createPost = ( data: NetParams.PostCreatePost ): Promise => { return request({ method: "post", url: "/v1/post", data, }); }; /** 删除动态 */ export const deletePost = ( data: NetParams.PostDeletePost ): Promise => { return request({ method: "delete", url: "/v1/post", data, }); }; /** 锁定/解锁动态 */ export const lockPost = ( data: NetParams.PostLockPost ): Promise => { return request({ method: "post", url: "/v1/post/lock", data, }); }; /** 置顶/取消置顶动态 */ export const stickPost = ( data: NetParams.PostStickPost ): Promise => { return request({ method: "post", url: "/v1/post/stick", data, }); }; /** 设为亮点/取消亮点动态 */ export const highlightPost = ( data: NetParams.PostHighlightPost ): Promise => { return request({ method: "post", url: "/v1/post/highlight", data, }); }; /** 置顶/取消置顶动态 */ export const visibilityPost = ( data: NetParams.PostVisibilityPost ): Promise => { return request({ method: "post", url: "/v1/post/visibility", data, }); }; /** 点赞评论 */ export const thumbsUpTweetComment = ( data: NetParams.PostTweetCommentThumbs ): Promise => { return request({ method: "post", url: "/v1/tweet/comment/thumbsup", data, }); }; /** 点踩评论 */ export const thumbsDownTweetComment = ( data: NetParams.PostTweetCommentThumbs ): Promise => { return request({ method: "post", url: "/v1/tweet/comment/thumbsdown", data, }); }; /** 点赞评论回复 */ export const thumbsUpTweetReply = ( data: NetParams.PostTweetReplyThumbs ): Promise => { return request({ method: "post", url: "/v1/tweet/reply/thumbsup", data, }); }; /** 点踩评论回复 */ export const thumbsDownTweetReply = ( data: NetParams.PostTweetReplyThumbs ): Promise => { return request({ method: "post", url: "/v1/tweet/reply/thumbsdown", data, }); }; /** 发布动态评论 */ export const createComment = ( data: NetParams.PostCreateComment ): Promise => { return request({ method: "post", url: "/v1/post/comment", data, }); }; /** 删除评论 */ export const deleteComment = ( data: NetParams.PostDeleteComment ): Promise => { return request({ method: "delete", url: "/v1/post/comment", data, }); }; /** 精选评论 */ export const highlightComment = ( data: NetParams.PostHighlightComment ): Promise => { return request({ method: "post", url: "/v1/post/comment/highlight", data, }); }; /** 发布评论回复 */ export const createCommentReply = ( data: NetParams.PostCreateCommentReply ): Promise => { return request({ method: "post", url: "/v1/post/comment/reply", data, }); }; /** 删除评论回复 */ export const deleteCommentReply = ( data: NetParams.PostDeleteCommentReply ): Promise => { return request({ method: "delete", url: "/v1/post/comment/reply", data, }); }; /** 置顶/取消置顶话题 */ export const stickTopic = ( data: NetParams.PostStickTopic ): Promise => { return request({ method: "post", url: "/v1/topic/stick", data, }); }; /** 关注话题 */ export const followTopic = ( data: NetParams.PostFollowTopic ): Promise => { return request({ method: "post", url: "/v1/topic/follow", data, }); }; /** 取消关注话题 */ export const unfollowTopic = ( data: NetParams.PostUnfollowTopic ): Promise => { return request({ method: "post", url: "/v1/topic/unfollow", data, }); };