import request from '@/config/request';
export const APIHealthy = {
  getSpoList, //获取血氧列表
  getHeartRateList, //获取心率列表
  getTemperatureList, //获取体温列表
  setLocationConfig, //设置设备定位控制参数
  getLocationConfig, //获取设备定位控制参数
  getHealthConfig, //获取设备健康控制参数(心率、血氧、测温)
  setHealthConfig, //设置设备健康控制参数(心率、血氧、测温)
  setUploadConfig, //置设备上报周期参数
  getUploadConfig, //取设备上报周期参数
  setDrownConfig, //设置设备防溺水参数
  getDrownConfig, //获取设备防溺水参数
  setNowearConfig, //设置设备未佩戴检测参数
  getNowearConfig, //设置设备未佩戴检测参数
  setWatchConfig, //设置设备未佩戴检测参数
  getWatchConfig, //设置设备未佩戴检测参数
  setBloodPressConfig, //设置设备血压检测参数
  getBloodPressConfig, //获取设备血压检测参数
  getBloodPressList, //获取设备血压数据
  setPsychAbilityConfig, //心理监测能力开通（下发参数）
  getPsychAbilityConfig, //获取心理监测能力开通参数
  setLongSitReminder, //设置设备久坐提醒参数
  getLongSitReminder, //获取设备久坐提醒参数
  setRaiseToLightScreen, //设置设备抬腕亮屏参数
  getRaiseToLightScreen //获取设备抬腕亮屏参数
};
export default APIHealthy;

function getSpoList(params) {
  return request({
    url: '/api/Healthy/SpoList',
    method: 'post',
    data: params
  });
}

function getHeartRateList(params) {
  return request({
    url: '/api/Healthy/HeartRateList',
    method: 'post',
    data: params
  });
}
function getTemperatureList(params) {
  return request({
    url: '/api/Healthy/TemperatureList',
    method: 'post',
    data: params
  });
}

function setLocationConfig(params) {
  return request({
    url: '/api/Command/SetLocationConfig',
    method: 'post',
    headers: { authKey: 'key1' },
    data: params
  });
}
function getLocationConfig({ imei }) {
  return request({
    url: '/api/Command/GetLocationConfig',
    method: 'get',
    headers: { authKey: 'key1' },
    params: { imei }
  });
}
function setHealthConfig(params) {
  return request({
    url: '/api/Command/SetHealthConfig',
    method: 'post',
    headers: { authKey: 'key1' },
    data: params
  });
}
function getHealthConfig({ imei }) {
  return request({
    url: '/api/Command/GetHealthConfig',
    method: 'get',
    headers: { authKey: 'key1' },
    params: { imei }
  });
}

function setUploadConfig(params) {
  return request({
    url: '/api/Command/SetUploadConfig',
    method: 'post',
    headers: { authKey: 'key1' },
    data: params
  });
}
function getUploadConfig({ imei }) {
  return request({
    url: '/api/Command/GetUploadConfig',
    method: 'get',
    headers: { authKey: 'key1' },
    params: { imei }
  });
}
function setDrownConfig(params) {
  return request({
    url: '/api/Command/SetDrownConfig',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function getDrownConfig(imei) {
  return request({
    url: '/api/Command/GetDrownConfig',
    method: 'get',
    headers: { AuthKey: 'key1' },
    params: { imei }
  });
}

function setNowearConfig(params) {
  return request({
    url: '/api/Command/SetNowearConfig',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function getNowearConfig(imei) {
  return request({
    url: '/api/Command/GetNowearConfig',
    method: 'get',
    headers: { AuthKey: 'key1' },
    params: { imei }
  });
}
function setWatchConfig(params) {
  return request({
    url: '/api/Device/SetWatchConfig',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function getWatchConfig(imei) {
  return request({
    url: '/api/Device/GetWatchConfig',
    method: 'get',
    headers: { AuthKey: 'key1' },
    params: { imei }
  });
}
function setBloodPressConfig(params) {
  return request({
    url: '/api/Command/SetBloodPressConfig',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function getBloodPressConfig(imei) {
  return request({
    url: '/api/Command/GetBloodPressConfig',
    method: 'get',
    headers: { AuthKey: 'key1' },
    params: { imei }
  });
}
function getBloodPressList(params) {
  return request({
    url: '/api/Healthy/BloodPressList',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function setPsychAbilityConfig(params) {
  return request({
    url: '/api/Command/SetPsychAbilityConfig',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function getPsychAbilityConfig(imei) {
  return request({
    url: '/api/Command/GetPsychAbilityConfig',
    method: 'get',
    headers: { AuthKey: 'key1' },
    params: { imei }
  });
}
function setLongSitReminder(params) {
  return request({
    url: '/api/Command/SetLongSitReminder',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function getLongSitReminder(imei) {
  return request({
    url: '/api/Command/GetLongSitReminder',
    method: 'get',
    headers: { AuthKey: 'key1' },
    params: { imei }
  });
}
function setRaiseToLightScreen(params) {
  return request({
    url: '/api/Command/SetRaiseToLightScreen',
    method: 'post',
    headers: { AuthKey: 'key1' },
    data: params
  });
}
function getRaiseToLightScreen(imei) {
  return request({
    url: '/api/Command/GetRaiseToLightScreen',
    method: 'get',
    headers: { AuthKey: 'key1' },
    params: { imei }
  });
}
