Browse Source

支持近期未使用清除

jihuaqiang 1 week ago
parent
commit
098233108f

+ 7 - 2
src/views/publishContent/weCom/components/videoSelectModal/index.tsx

@@ -73,7 +73,7 @@ interface GetVideoListParams {
 	pageNum?: number;
 	_pageSize?: number;
 	_sortType?: SortTypeEnum;
-	_recentNotUsed?: RecentNotUsedType;
+	_recentNotUsed?: RecentNotUsedType | '';
 	_category?: string;
 	_tags?: string[];
 	_videoLibraryType?: VideoLibraryType;
@@ -234,7 +234,12 @@ const playVideo = (video: VideoItem) => {
 
 	const onRecentNotUsedChange = (v: RecentNotUsedType) => {
 		setRecentNotUsed(v);
-		getVideoList({pageNum: 1, _recentNotUsed: v});
+		console.log('onRecentNotUsedChange', v);
+		if (isNil(v)) {
+			getVideoList({pageNum: 1, _recentNotUsed: ''});
+		} else {
+			getVideoList({pageNum: 1, _recentNotUsed: v});
+		}
 	}
 
 	const handleTagChange = (tag: string, checked: boolean) => {