import { defHttp } from '@/utils/http/axios';

enum Api {
  VerifyToken = '/api/DroneDock/VerifyToken',
  GetDroneDockflightInfos = '/api/DroneDock/GetDroneDockflightInfos',
  GetTaskPicList = '/api/Manage/GetTaskPicList',
  GetTaskVideoList = '/api/Manage/GetTaskVideoList',
}

export function getVerifyToken(token) {
  return defHttp.get({ url: Api.VerifyToken + '?token=' + token });
}

export function getDroneDockflightInfos(id) {
  return defHttp.get({ url: Api.GetDroneDockflightInfos + '?taskid=' + id });
}

export function getTaskPicList(params) {
  return defHttp.get({
    url: Api.GetTaskPicList + '?flightId=' + params.flightId + '&timestamp=' + params.timestamp,
  });
}

export function getTaskVideoList(params) {
  return defHttp.get({
    url: Api.GetTaskVideoList + '?flightId=' + params.flightId + '&timestamp=' + params.timestamp,
  });
}
