|
|
@@ -8,6 +8,7 @@ import { VideoItem } from '../types'; // Import from common types
|
|
|
import { GzhPlanDataType, GzhPlanType } from '../../hooks/useGzhPlanList';
|
|
|
import { useAccountOptions } from '../../hooks/useAccountOptions';
|
|
|
import { VideoLibraryType } from '@src/views/publishContent/weCom/components/videoSelectModal';
|
|
|
+import { VideoSearchPlanType } from '@src/views/publishContent/weCom/type';
|
|
|
import useLogger from '@src/hooks/useLogger';
|
|
|
|
|
|
const { Option } = Select;
|
|
|
@@ -38,6 +39,16 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({ visible, isSu
|
|
|
const { accountOptions, getAccountList } = useAccountOptions();
|
|
|
const { uploadLogVideoCreatePublish } = useLogger();
|
|
|
|
|
|
+ const getVideoListType = (planType: GzhPlanType) => {
|
|
|
+ if (planType === GzhPlanType.自动回复) {
|
|
|
+ return VideoSearchPlanType.自动回复;
|
|
|
+ } else if (planType === GzhPlanType.公众号推送) {
|
|
|
+ return VideoSearchPlanType.公众号推送;
|
|
|
+ } else {
|
|
|
+ return VideoSearchPlanType.服务号推送;
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
// 处理code参数
|
|
|
useEffect(() => {
|
|
|
if (code) {
|
|
|
@@ -102,14 +113,14 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({ visible, isSu
|
|
|
}
|
|
|
formData.videoList = selectedVideos;
|
|
|
// 上报日志
|
|
|
- uploadLogVideoCreatePublish({
|
|
|
- videoList: selectedVideos,
|
|
|
- traceId: Date.now(),
|
|
|
- requestId: Date.now(),
|
|
|
- planType: planType,
|
|
|
- gzhAccountId: formData.accountId,
|
|
|
- subChannel: 'weGZH'
|
|
|
- });
|
|
|
+ uploadLogVideoCreatePublish({
|
|
|
+ videoList: selectedVideos,
|
|
|
+ traceId: Date.now(),
|
|
|
+ requestId: Date.now(),
|
|
|
+ planType: getVideoListType(planType),
|
|
|
+ gzhAccountId: formData.accountId,
|
|
|
+ subChannel: 'weGZH'
|
|
|
+ });
|
|
|
onOk(formData);
|
|
|
})
|
|
|
.catch((info) => {
|