|
@@ -2,7 +2,7 @@ import http from '@src/http';
|
|
|
import { uploadLogApi } from '@src/http/api';
|
|
import { uploadLogApi } from '@src/http/api';
|
|
|
import sso from '@src/http/sso';
|
|
import sso from '@src/http/sso';
|
|
|
import { VideoItem } from '@src/views/publishContent/types';
|
|
import { VideoItem } from '@src/views/publishContent/types';
|
|
|
-import { RecentNotUsedType, SortTypeEnum, TagType, VideoLibraryType } from '@src/views/publishContent/weCom/components/videoSelectModal';
|
|
|
|
|
|
|
+import { VideoLibraryType, VideoSortType } from '@src/views/publishContent/weCom/components/videoSelectModal';
|
|
|
import { VideoSearchPlanType } from '@src/views/publishContent/weCom/type';
|
|
import { VideoSearchPlanType } from '@src/views/publishContent/weCom/type';
|
|
|
|
|
|
|
|
type NormalLogParams = {
|
|
type NormalLogParams = {
|
|
@@ -16,16 +16,16 @@ type NormalLogParams = {
|
|
|
type VideoListQueryLogParams = {
|
|
type VideoListQueryLogParams = {
|
|
|
category?: string;
|
|
category?: string;
|
|
|
title?: string;
|
|
title?: string;
|
|
|
- recentNotUsed?: RecentNotUsedType;
|
|
|
|
|
- sortType?: SortTypeEnum;
|
|
|
|
|
- tags?: TagType[];
|
|
|
|
|
|
|
+ recentNotUsed?: number;
|
|
|
|
|
+ sortType?: VideoSortType;
|
|
|
|
|
+ tags?: string[];
|
|
|
videoLibraryType?: VideoLibraryType;
|
|
videoLibraryType?: VideoLibraryType;
|
|
|
} & NormalLogParams;
|
|
} & NormalLogParams;
|
|
|
|
|
|
|
|
type VideoLogParams = {
|
|
type VideoLogParams = {
|
|
|
videoId: number;
|
|
videoId: number;
|
|
|
score?: number;
|
|
score?: number;
|
|
|
- tags?: TagType[];
|
|
|
|
|
|
|
+ tags?: string[];
|
|
|
title?: string;
|
|
title?: string;
|
|
|
cover?: string;
|
|
cover?: string;
|
|
|
libraryType?: VideoLibraryType;
|
|
libraryType?: VideoLibraryType;
|
|
@@ -76,7 +76,7 @@ const useLogger = () => {
|
|
|
sortType,
|
|
sortType,
|
|
|
tags,
|
|
tags,
|
|
|
videoLibraryType,
|
|
videoLibraryType,
|
|
|
- }:VideoListQueryLogParams) => {
|
|
|
|
|
|
|
+ }:VideoListQueryLogParams) => {
|
|
|
return uploadLog({
|
|
return uploadLog({
|
|
|
businessType: 'video_list_query',
|
|
businessType: 'video_list_query',
|
|
|
objectType: 'video_list',
|
|
objectType: 'video_list',
|
|
@@ -96,7 +96,7 @@ const useLogger = () => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const uploadLogVideoPlay = ({videoId, traceId, requestId, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
|
|
|
|
+ const uploadLogVideoPlay = ({videoId, traceId, requestId, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
return uploadLog({
|
|
return uploadLog({
|
|
|
businessType: 'video_play',
|
|
businessType: 'video_play',
|
|
|
objectType: 'video',
|
|
objectType: 'video',
|
|
@@ -111,7 +111,7 @@ const useLogger = () => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const uploadLogVideoPlayEnd = ({videoId, playTime, traceId, requestId, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
|
|
|
|
+ const uploadLogVideoPlayEnd = ({videoId, playTime, traceId, requestId, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
return uploadLog({
|
|
return uploadLog({
|
|
|
businessType: 'video_play_end',
|
|
businessType: 'video_play_end',
|
|
|
objectType: 'video',
|
|
objectType: 'video',
|
|
@@ -127,7 +127,7 @@ const useLogger = () => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const uploadLogVideoView = ({videoId, idx, score, tags, title, cover, libraryType, traceId, requestId, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
|
|
|
|
+ const uploadLogVideoView = ({videoId, idx, score, tags, title, cover, libraryType, traceId, requestId, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
return uploadLog({
|
|
return uploadLog({
|
|
|
businessType: 'video_view',
|
|
businessType: 'video_view',
|
|
|
objectType: 'video',
|
|
objectType: 'video',
|
|
@@ -148,7 +148,7 @@ const useLogger = () => {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const uploadLogVideoCollect = ({videoId, traceId, requestId, collect, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
|
|
|
|
+ const uploadLogVideoCollect = ({videoId, traceId, requestId, collect, planType, gzhAccountId, subChannel}: VideoLogParams) => {
|
|
|
return uploadLog({
|
|
return uploadLog({
|
|
|
businessType: 'video_collect',
|
|
businessType: 'video_collect',
|
|
|
objectType: 'video',
|
|
objectType: 'video',
|
|
@@ -171,7 +171,7 @@ const useLogger = () => {
|
|
|
planType,
|
|
planType,
|
|
|
gzhAccountId,
|
|
gzhAccountId,
|
|
|
subChannel
|
|
subChannel
|
|
|
- }: PublishPlanLogParams) => {
|
|
|
|
|
|
|
+ }: PublishPlanLogParams) => {
|
|
|
return uploadLog({
|
|
return uploadLog({
|
|
|
businessType: 'publish_plan_create',
|
|
businessType: 'publish_plan_create',
|
|
|
objectType: 'publish_plan',
|
|
objectType: 'publish_plan',
|