feat: 将 content_group
中的第一个文本内容移动至 metahuman_text
字段
This commit is contained in:
parent
c7d964965d
commit
68691c0e54
@ -85,7 +85,7 @@ export default function ArticleEditModal(props: Props) {
|
||||
}
|
||||
const save = props.type == 'news' ? article.save : regenerate
|
||||
setState({loading: true})
|
||||
save(title, groups, props.id && props.id > 0 ? props.id : undefined).then(() => {
|
||||
save(title, groups[0][0].content, groups.slice(1), props.id && props.id > 0 ? props.id : undefined).then(() => {
|
||||
props.onClose?.(true)
|
||||
}).catch(e => {
|
||||
setState({error: e.data || '保存失败,请重试!'})
|
||||
|
@ -20,9 +20,10 @@ export function getById(id: Id) {
|
||||
return post<ArticleDetail>({url: '/article/detail/' + id})
|
||||
}
|
||||
|
||||
export function save(title: string, content_group: BlockContent[][], id?: number) {
|
||||
export function save(title: string, metahuman_text: string, content_group: BlockContent[][], id?: number) {
|
||||
return post<{ content: string }>(id && id > 0 ? '/article/modify' : '/article/create/new', {
|
||||
title,
|
||||
metahuman_text,
|
||||
content_group,
|
||||
id
|
||||
})
|
||||
|
@ -21,11 +21,12 @@ export function deleteHistories(ids: Id[]) {
|
||||
* @param content_group
|
||||
* @param article_id
|
||||
*/
|
||||
export function regenerate(title: string, content_group: BlockContent[][], article_id?: Id) {
|
||||
export function regenerate(title: string, metahuman_text: string, content_group: BlockContent[][], article_id?: Id) {
|
||||
return post<{ content: string }>({
|
||||
url: '/video/regenerate',
|
||||
data: {
|
||||
title,
|
||||
metahuman_text,
|
||||
content_group,
|
||||
article_id
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user