diff --git a/src/components/article/edit-modal.tsx b/src/components/article/edit-modal.tsx index 9c8ee7c..b0f4c05 100644 --- a/src/components/article/edit-modal.tsx +++ b/src/components/article/edit-modal.tsx @@ -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',{ diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index a6c75ae..2c7730c 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -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 }