index.js 1.08 KB
import api from "../index";
import urls from "./urls";

export default {
  //登陆
  getTask(params, id) {
    return api.get(urls.getTask, params);
  },
  editTask(params, taskid) {
    return api.post(urls.editTask(taskid), params);
  },
  editRoi(taskid, subtaskid, params) {
    return api.post(urls.editroi(taskid, subtaskid), params);
  },
  alternatestate(params, taskid, subtaskid) {
    return api.post(urls.alternatestate(taskid, subtaskid), params);
  },
  algostate(params, taskid, subtaskid) {
    return api.post(urls.algostate(taskid, subtaskid), params);
  },
  getSubTask(taskid) {
    return api.get(urls.getSubTask(taskid));
  },
  getStream(devid, vrefid) {
    return api.get(urls.getstream(devid, vrefid));
  },
  getPlayUrl(subid) {
    return api.get(urls.getPlayUrl(subid)); // 获取播放地址
  },
  getTaskParams(taskid, subtaskid) {
    return api.get(urls.getTaskParams(taskid, subtaskid));
  },
  cutpic(devid, vchanid, subtaskid) {
    return api.get(urls.cutpic(devid, vchanid, subtaskid));
  },
  deleteTask(taskid) {
    return api.delete(urls.deleteTask(taskid));
  }
};