index.js
1.42 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 api from "../index";
import baseUrl from "../baseUrl";
export default {
getDev(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs`);
},
getSubdev(pid, params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${pid}/fx_devs`, params);
},
getGlobalWs(uid, clientid) {
return api.get(`${baseUrl}/api/v1/devconf_fx/ws_url?src_type=user&user_unid=${uid}&client_unid=${clientid}`);
},
getConfParam(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/conf_param/types`, params); //获取类型
},
getDevtree(devuid, devname, params) {
let url = "";
switch (devname) {
case "外部设备":
url = "/vchan_struct?vchan_type=extern";
break;
case "内部设备":
url = "/vchan_struct?vchan_type=camera";
break;
case "短视频":
url = "/vchans?vchan_type=vfile";
break;
}
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}${url}`, params);
},
getFxStream(devuid, refid) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${devuid}/vchans/${refid}`); //获取分析流
},
sipSet(devid, userid) {
return api.get(`${baseUrl}/devconf_fx/devs/${devid}/${userid}/sip_server`);
},
getStore(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/store_confs`, params);
},
getFreelist(dev_unid, params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${dev_unid}/fx_devs/free`, params)
}
};