From 919f0dc120e8b4c2984539ff4708580b858f0571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Thu, 11 Sep 2025 10:05:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A1=A8=E5=8D=95):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=87=87=E9=9B=86=E5=86=85=E5=AE=B9=E7=B1=BB=E5=9E=8B=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在表单页面新增采集内容类型选择功能,支持用户选择文本、图片和视频类型 --- .../pages/mobile/mine/content/form/index.tsx | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Cunkebao/src/pages/mobile/mine/content/form/index.tsx b/Cunkebao/src/pages/mobile/mine/content/form/index.tsx index 0082d02c..2aed0816 100644 --- a/Cunkebao/src/pages/mobile/mine/content/form/index.tsx +++ b/Cunkebao/src/pages/mobile/mine/content/form/index.tsx @@ -48,6 +48,11 @@ export default function ContentForm() { const [showEndPicker, setShowEndPicker] = useState(false); const [keywordsInclude, setKeywordsInclude] = useState(""); const [keywordsExclude, setKeywordsExclude] = useState(""); + const [catchType, setCatchType] = useState([ + "text", + "image", + "video", + ]); const [submitting, setSubmitting] = useState(false); const [loading, setLoading] = useState(false); @@ -65,6 +70,7 @@ export default function ContentForm() { setSelectedFriendsOptions(data.friendsGroupsOptions || []); setKeywordsInclude((data.keywordInclude || []).join(",")); setKeywordsExclude((data.keywordExclude || []).join(",")); + setCatchType(data.catchType || ["text", "image", "video"]); setAIPrompt(data.aiPrompt || ""); setUseAI(!!data.aiPrompt); setEnabled(data.status === 1); @@ -108,6 +114,7 @@ export default function ContentForm() { .split(/,|,|\n|\s+/) .map(s => s.trim()) .filter(Boolean), + catchType, aiPrompt, timeEnabled: dateRange[0] || dateRange[1] ? 1 : 0, startTime: dateRange[0] ? formatDate(dateRange[0]) : "", @@ -236,6 +243,46 @@ export default function ContentForm() { + {/* 采集内容类型 */} +
采集内容类型
+
+
+ {["text", "image", "video"].map(type => ( +
{ + setCatchType(prev => + prev.includes(type) + ? prev.filter(t => t !== type) + : [...prev, type], + ); + }} + > + + {type === "text" + ? "文本" + : type === "image" + ? "图片" + : "视频"} + +
+ ))} +
+
+
是否启用AI