feat: 新增api接口文件

This commit is contained in:
吃货
2025-07-05 00:41:50 +08:00
parent 8b477131a2
commit e0080bb3e0
118 changed files with 8710 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace MpFreePublishApi {
/** 自由发布文章信息 */
export interface FreePublish {
id?: number;
accountId: number;
mediaId: string;
articleId: string;
title: string;
author: string;
digest: string;
content: string;
thumbUrl: string;
status: number;
publishTime?: Date;
createTime?: Date;
}
}
/** 查询自由发布文章列表 */
export function getFreePublishPage(params: PageParam) {
return requestClient.get<PageResult<MpFreePublishApi.FreePublish>>(
'/mp/free-publish/page',
{
params,
},
);
}
/** 删除自由发布文章 */
export function deleteFreePublish(accountId: number, articleId: string) {
return requestClient.delete('/mp/free-publish/delete', {
params: { accountId, articleId },
});
}
/** 发布自由发布文章 */
export function submitFreePublish(accountId: number, mediaId: string) {
return requestClient.post('/mp/free-publish/submit', null, {
params: { accountId, mediaId },
});
}