fix: todo修改

This commit is contained in:
hw
2025-11-19 11:12:09 +08:00
parent f1aec24f34
commit 887e9766be
9 changed files with 72 additions and 90 deletions

View File

@@ -24,6 +24,49 @@ export namespace MpDraftApi {
articles: Article[];
createTime?: Date;
}
/** 图文项(包含预览字段) */
export interface NewsItem {
title: string;
thumbMediaId: string;
author: string;
digest: string;
showCoverPic: number;
content: string;
contentSourceUrl: string;
needOpenComment: number;
onlyFansCanComment: number;
thumbUrl: string;
picUrl?: string; // 用于预览封面
}
/** 图文列表 */
export interface NewsItemList {
newsItem: NewsItem[];
}
/** 草稿文章(用于展示) */
export interface DraftArticle {
mediaId: string;
content: NewsItemList;
updateTime: number;
}
}
/** 创建空的图文项 */
export function createEmptyNewsItem(): MpDraftApi.NewsItem {
return {
title: '',
thumbMediaId: '',
author: '',
digest: '',
showCoverPic: 0,
content: '',
contentSourceUrl: '',
needOpenComment: 0,
onlyFansCanComment: 0,
thumbUrl: '',
};
}
/** 查询草稿列表 */