This repository has been archived by the owner on Nov 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
142 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,22 @@ export function getFeedCommentPinneds(after = 0) { | |
}); | ||
} | ||
|
||
/** | ||
* 发表动态评论 | ||
* @author mutoe <[email protected]> | ||
* @export | ||
* @param {Number} feedId | ||
* @param {Object} data | ||
* @param {String} data.body 评论内容 | ||
* @param {Number=} data.reply_user 回复的用户id | ||
* @returns | ||
*/ | ||
export function postComment(feedId, data) { | ||
return api.post(`/feeds/${feedId}/comments`, data, { | ||
validataStatus: s => s === 201 | ||
}); | ||
} | ||
|
||
/** | ||
* 评论申请置顶 | ||
* @author mutoe <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,14 +185,26 @@ export function getPostAudits({ after = 0, group = 0 }) { | |
}); | ||
} | ||
|
||
export function getPostCommentAudits({ after = 0, post = 0 }) { | ||
return get("/plus-group/pinned/comments", { | ||
after, | ||
limit, | ||
post | ||
/** | ||
* 发表帖子评论 | ||
* @author mutoe <[email protected]> | ||
* @export | ||
* @param {Number} postId | ||
* @param {Object} data | ||
* @param {String} data.body 评论内容 | ||
* @param {Number=} data.reply_user 回复的用户id | ||
* @returns | ||
*/ | ||
export function postComment(postId, data) { | ||
return api.post(`/plus-group/group-posts/${postId}/comments`, data, { | ||
validataStatus: s => s === 201 | ||
}); | ||
} | ||
|
||
export function getPostCommentAudits({ after = 0, post = 0 }) { | ||
return get("/plus-group/pinned/comments", { after, limit, post }); | ||
} | ||
|
||
/** | ||
* 申请评论置顶 | ||
* @author mutoe <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters