urls.js
1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import baseUrl from "../baseUrl";
function gitTimer() {
return new Date().getTime();
}
export default {
getTask: `${baseUrl}/api/v1/devconf_fx/tasks?s=${gitTimer()}`,
editTask: taskid => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}`;
},
editroi: (taskid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtasks/${subtaskid}?s=${gitTimer()}`; // ROI设置
},
alternatestate: (taskid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtask/${subtaskid}/suspend_alternate_task?s=${gitTimer()}`;
},
algostate: (taskid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtask/${subtaskid}/suspend_algorithm?s=${gitTimer()}`;
},
getSubTask: id => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtasks?s=${gitTimer()}`;
},
getstream: (devid, vrefid) => {
return `${baseUrl}/api/v1/stream/devs/${devid}/vchans/${vrefid}/live/is_sending?s=${gitTimer()}`;
},
getPlayUrl: subid => {
return `${baseUrl}/api/v1/devconf_fx/analyse/live/play_url?subtask_id=${subid}`; // 获取播放地址
},
getTaskParams: (taskid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtasks/${subtaskid}?s=${gitTimer()}`; // 推流信息
},
cutpic: (devid, vchanid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/devs/${devid}/vchans/${vchanid}/cut_pic?subtask_id=${subtaskid}&s=${gitTimer()}`; // 截图
},
deleteTask: taskid => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}?s=${gitTimer()}`; // 删除子任务
},
deleteSubTask: (taskid, subtaskid) => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/subtask/${subtaskid}?s=${gitTimer()}`; // 删除子任务
},
changeTask: taskid => {
return `${baseUrl}/api/v1/devconf_fx/tasks/${taskid}/start_or_stop?s=${gitTimer()}`; // 切换任务
}
};