UNPKG

@jdlinker/linker

Version:

jdLinker 系统模块

49 lines (43 loc) 1.16 kB
import { defHttp } from '@jdlinker/func'; export function getDeviceList(currentPage, count) { return defHttp.get({ url: `/api/device/query/devices`, params: { page: currentPage, count: count } }); } export function getTreeInfo(deviceId, parentId, onlyCatalog, currentPage, count) { if (onlyCatalog == null || typeof onlyCatalog === 'undefined') { onlyCatalog = false; } return defHttp.get({ url: `/api/device/query/tree/${deviceId}`, params: { page: currentPage, count: count, parentId: parentId, onlyCatalog: onlyCatalog } }); } export function playStart(deviceId, channelId) { return defHttp.get({ url: `/api/play/start/` + deviceId + '/' + channelId }); } export function getPlayUrl(app, stream, mediaServerId) { return defHttp.get({ url: `/api/push/getPlayUrl?app=${app}&stream=${stream}&mediaServerId=${mediaServerId}` }); } export function playBackStart(deviceId, channelId, startTime, endTime) { return defHttp.get({ url: `/api/playback/start/` + deviceId + '/' + channelId, params: { startTime: startTime, endTime: endTime } }); }