Initial project

This commit is contained in:
Timi
2025-07-08 16:33:11 +08:00
parent 1a5a16be74
commit f862530142
80 changed files with 8301 additions and 129 deletions
+36
View File
@@ -0,0 +1,36 @@
import {
axios,
CaptchaData,
Comment,
CommentPage,
CommentReply,
CommentReplyPage,
CommentReplyView,
CommentView,
PageResult
} from "~/index";
const BASE_URI = "/comment";
async function page(commentPage: CommentPage): Promise<PageResult<CommentView>> {
return axios.post(`${BASE_URI}/list`, commentPage);
}
async function create(captchaData: CaptchaData<Comment>): Promise<void> {
return axios.post(`${BASE_URI}/create`, captchaData);
}
async function pageReply(commentReplyPage: CommentReplyPage): Promise<PageResult<CommentReplyView>> {
return axios.post(`${BASE_URI}/reply/list`, commentReplyPage);
}
async function createReply(captchaData: CaptchaData<CommentReply>): Promise<void> {
return axios.post(`${BASE_URI}/reply/create`, captchaData);
}
export default {
page,
create,
createReply,
pageReply
};