Ver código fonte

fix 公众号搜索页码

jihuaqiang 2 dias atrás
pai
commit
929cc14363

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

@@ -78,8 +78,9 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 
 	const handleSearch = () => {
 		console.log('Searching for:', { category, searchTerm });
-		setCurrentPage(1);
-		getVideoList();
+		const currentPage = 1
+		setCurrentPage(currentPage);
+		getVideoList(currentPage);
 	};
 
 	const handleSelectVideo = (videoId: number) => {
@@ -164,6 +165,8 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 							placeholder="搜索视频标题"
 							style={{ width: 200 }}
 							value={searchTerm}
+							onPressEnter={handleSearch}
+							allowClear
 							onChange={e => setSearchTerm(e.target.value)}
 						/>
 					</div>