import { $http } from './index'; /** * 第三方走航数据接口 */ export default { /** * 启动获取任务范围内的走航数据后台任务 * @param {*} missionCode */ fetchMissionData(missionCode) { let label = null; if (import.meta.env.VITE_DATA_MODE == 'jingan') { label = 'shenxin'; } if (!label) return; let params = `label=${label}&missionCode=${missionCode}`; return $http .get(`air/thirdParty/data/fetch/mission?${params}`) .then((res) => res.data); }, /** * 启动获取设备实时最新走航数据后台任务 * @param {*} deviceType * @param {*} deviceCode * @param {*} startTime * @returns */ fetchLatestData(deviceType, deviceCode, startTime) { let label = null; if (import.meta.env.VITE_DATA_MODE == 'jingan') { label = 'shenxin'; } if (!label) return; return $http .get(`air/thirdParty/data/fetch/latest`, { params: { label, deviceType, deviceCode, startTime } }) .then((res) => res.data); } };