From a478c9dd097586bcdb133e658ac30363fe45cc1b Mon Sep 17 00:00:00 2001 From: callmeyan Date: Wed, 22 Jan 2025 22:02:16 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=20=E6=8E=A8=E9=80=81=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=89=8D=E5=85=88=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/article/edit-modal.tsx | 11 ++++++++++- src/pages/library/index.tsx | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) 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 }