75 lines
1.5 KiB
TypeScript
75 lines
1.5 KiB
TypeScript
import { http } from "@/utils/http";
|
|
import type { Res } from "@/utils/http/types";
|
|
// 定义类型
|
|
export interface Question {
|
|
startTime: number;
|
|
topicStem: string;
|
|
question: string;
|
|
pPTImageUrl: string;
|
|
}
|
|
|
|
export interface VideoKnowRes {
|
|
theme: string;
|
|
content: string;
|
|
knowPoint: string;
|
|
knowPointId: number;
|
|
questionArr: Question[];
|
|
startTime: number;
|
|
}
|
|
|
|
export interface SenseVoiceRes {
|
|
text: string;
|
|
start: number;
|
|
end: number;
|
|
}
|
|
export interface ShowTaskInfoRes {
|
|
captions: SenseVoiceRes[];
|
|
captions1: SenseVoiceRes[];
|
|
videoKnows: VideoKnowRes[];
|
|
mediaUrl: string;
|
|
}
|
|
export interface RowRloadResult {
|
|
progress: string;
|
|
lastEnum: string;
|
|
startTime: string;
|
|
errorMessage: string;
|
|
}
|
|
|
|
/** 刷新任务实时数据 */
|
|
export const RowRload = (id: any) => {
|
|
return http.request<RowRloadResult>("get", "/api/VideoTask/RowRload", {
|
|
params: { id }
|
|
});
|
|
};
|
|
|
|
/** 重试任务 */
|
|
export const ReStart = (id: any, selectEnum: number) => {
|
|
return http.request<any>("get", "/api/VideoTask/ReStart", {
|
|
params: { id, selectEnum }
|
|
});
|
|
};
|
|
|
|
|
|
/** 展示数据 */
|
|
export const ShowTaskInfo = (id: any) => {
|
|
return http.request<ShowTaskInfoRes>("get", "/api/VideoTask/ShowTaskInfo", {
|
|
params: { id }
|
|
});
|
|
};
|
|
|
|
|
|
|
|
/** 展示数据 */
|
|
export const RunningTaskList = (data: any) => {
|
|
return http.request<any>("post", "/api/VideoTask/RunningTaskList", {
|
|
data
|
|
});
|
|
};
|
|
|
|
|
|
/** 展示数据 */
|
|
export const ErrorTaskList = (data: any) => {
|
|
return http.request<any>("post", "/api/VideoTask/ErrorTaskList", {
|
|
data
|
|
});
|
|
}; |