gaoluyang
2026-06-24 712aa51536236d43e87273e4ce45ac5691dffad8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import type { PageParam, PageResult } from '..\..\..\packages\effects\request\src';
 
import { requestClient } from '#/api/request';
 
export namespace MpFreePublishApi {
  /** 图文文章内容 */
  export interface FreePublishArticle {
    title?: string;
    thumbUrl?: string;
    picUrl?: string;
    url?: string;
  }
 
  /** 图文内容 */
  export interface FreePublishContent {
    newsItem?: FreePublishArticle[];
  }
 
  /** 自由发布文章信息 */
  export interface FreePublish {
    id?: number;
    accountId: number;
    mediaId: string;
    articleId: string;
    title: string;
    author: string;
    digest: string;
    content?: FreePublishContent;
    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 },
  });
}