fixed: 推送视频前先保存

This commit is contained in:
LittleBoy 2025-01-22 22:02:16 +08:00
parent a8b672037c
commit a478c9dd09
2 changed files with 10 additions and 2 deletions

View File

@ -93,9 +93,18 @@ export default function ArticleEditModal(props: Props) {
setState({loading: false})
});
}
const handlePush2Video = () =>{
const handlePush2Video = async () =>{
if (!title) {
// setState({msgTitle: '请输入标题内容'});
return;
}
if (groups.length == 0 || groups[0].length == 0 || !groups[0][0].content) {
// setState({msgGroup: '请输入正文文本内容'});
return;
}
if(!props.id || state.generating) return;
setState({generating:true})
await article.save(title, groups[0][0].content, groups.slice(1), props.id)
push2video([props.id]).then(() => {
showToast('推流成功', 'success')
// navigate('/create?state=push-success',{

View File

@ -13,7 +13,6 @@ import ButtonToTop from "@/components/scoller/button-to-top.tsx";
import {IconArrowRight, IconDelete} from "@/components/icons";
const DEFAULT_PAGE_LIMIT = {
page: 1,
limit: 12
}