|
@@ -47,6 +47,16 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
|
|
|
const [playingVideo, setPlayingVideo] = useState<VideoItem | null>(null);
|
|
|
const MAX_SELECTION = 3;
|
|
|
|
|
|
+ const getVideoListType = (planType: GzhPlanType) => {
|
|
|
+ if (planType === GzhPlanType.自动回复) {
|
|
|
+ return VideoSearchPlanType.自动回复;
|
|
|
+ } else if (planType === GzhPlanType.公众号推送) {
|
|
|
+ return VideoSearchPlanType.公众号推送;
|
|
|
+ } else {
|
|
|
+ return VideoSearchPlanType.服务号推送;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
const getVideoList = async (pageNum?: number, _pageSize?: number) => {
|
|
|
setLoading(true);
|
|
|
setCurrentPage(pageNum || currentPage);
|
|
@@ -55,7 +65,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
|
|
|
category,
|
|
|
title: searchTerm,
|
|
|
sort,
|
|
|
- type: planType === GzhPlanType.自动回复 ? VideoSearchPlanType.自动回复 : VideoSearchPlanType.服务号推送,
|
|
|
+ type: getVideoListType(planType),
|
|
|
pageNum: pageNum || currentPage,
|
|
|
pageSize: _pageSize || pageSize,
|
|
|
}).catch(() => {
|