Преглед изворни кода

公众号自动回复 选视频上限由 20 收紧到 3:videoSelectModal MAX_SELECTION 按 planType 区分,publishPlanModal 添加视频按钮显隐同步;其他 gzh 入口(服务号推送/公众号推送/小程序投流)沿用 20。

刘立冬 пре 3 дана
родитељ
комит
e9071626ab

+ 1 - 1
src/views/publishContent/weGZH/components/publishPlanModal/index.tsx

@@ -326,7 +326,7 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({ visible, isSu
 									))}
 		
 									{/* Add Video Button - Conditionally Rendered */}
-									{selectedVideos.length < 20 && (
+									{selectedVideos.length < (planType === GzhPlanType.自动回复 ? 3 : 20) && (
 										<div
 											className={`w-[240px] h-[316px] flex flex-col justify-center items-center border border-dashed rounded ${accountId ? 'border-gray-300 cursor-pointer dark:border-gray-600 hover:border-blue-500 hover:text-blue-500' : 'border-gray-200 text-gray-300 cursor-not-allowed bg-gray-50'}`}
 											onClick={openVideoSelector} // Open the drawer on click

+ 1 - 1
src/views/publishContent/weGZH/components/videoSelectModal/index.tsx

@@ -147,7 +147,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
 	const currentPageRef = useRef(1);
 	const getVideoListRef = useRef<(pageNum: number, mode: LoadMode) => Promise<void>>();
 	const reqIdRef = useRef(0);
-	const MAX_SELECTION = 20;
+	const MAX_SELECTION = planType === GzhPlanType.自动回复 ? 3 : 20;
 
 	useEffect(() => { hasMoreRef.current = hasMore; }, [hasMore]);
 	useEffect(() => { loadingRef.current = loading; }, [loading]);