|
|
@@ -20,7 +20,7 @@ import { VideoItem, VideoListResponse } from '@src/views/publishContent/weGZH/co
|
|
|
import http from '@src/http';
|
|
|
import { getVideoContentListApi, getUploadVideoContentListApi } from '@src/http/api';
|
|
|
import { useVideoCategoryOptions } from '@src/views/publishContent/weGZH/hooks/useVideoCategoryOptions';
|
|
|
-import { WeComPlanType, WeVideoItem, VideoSearchPlanType } from '@src/views/publishContent/weCom/type'
|
|
|
+import { WeComPlanType, VideoSearchPlanType } from '@src/views/publishContent/weCom/type'
|
|
|
import { enumToOptions } from '@src/utils/helper';
|
|
|
import { isNil } from 'lodash';
|
|
|
import { GzhPlanType } from '@src/views/publishContent/weGZH/hooks/useGzhPlanList';
|
|
|
@@ -36,9 +36,9 @@ interface VideoSelectModalProps {
|
|
|
planType: WeComPlanType | GzhPlanType;
|
|
|
visible: boolean;
|
|
|
onClose: () => void;
|
|
|
- onOk: (selectedVideos: (VideoItem | WeVideoItem)[]) => void;
|
|
|
+ onOk: (selectedVideos: VideoItem[]) => void;
|
|
|
initialSelectedIds?: number[];
|
|
|
- selectedVideos?: (VideoItem | WeVideoItem)[];
|
|
|
+ selectedVideos?: VideoItem[];
|
|
|
defaultVideoLibraryType?: VideoLibraryType;
|
|
|
}
|
|
|
|
|
|
@@ -91,10 +91,10 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
|
|
|
const [pageSize, setPageSize] = useState(10);
|
|
|
const [total, setTotal] = useState(0);
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
- const [videoList, setVideoList] = useState<(WeVideoItem | VideoItem)[]>([]);
|
|
|
- const [videoListAll, setVideoListAll] = useState<(WeVideoItem | VideoItem)[]>([]);
|
|
|
+ const [videoList, setVideoList] = useState<VideoItem[]>([]);
|
|
|
+ const [videoListAll, setVideoListAll] = useState<VideoItem[]>([]);
|
|
|
const [selectedVideoIds, setSelectedVideoIds] = useState<Set<number>>(new Set(initialSelectedIds));
|
|
|
- const [playingVideo, setPlayingVideo] = useState<WeVideoItem | VideoItem | null>(null);
|
|
|
+ const [playingVideo, setPlayingVideo] = useState<VideoItem | null>(null);
|
|
|
const [videoLibraryType, setVideoLibraryType] = useState<VideoLibraryType>(defaultVideoLibraryType || VideoLibraryType.平台视频库);
|
|
|
const MAX_SELECTION = 3;
|
|
|
|
|
|
@@ -199,7 +199,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
|
|
|
onOk(uniqueSelectedVideos);
|
|
|
};
|
|
|
|
|
|
- const playVideo = (video: WeVideoItem | VideoItem) => {
|
|
|
+const playVideo = (video: VideoItem) => {
|
|
|
setPlayingVideo(video);
|
|
|
};
|
|
|
|