import { request } from '@@/plugin-request/request';
import { stringify } from 'qs';

/**
 * 查询红外类型列表数据
 * @param param
 */
export async function queryInfraredCategory(param: object) {
  return request(`/web/v1/infrared_category?${stringify(param)}`);
}

/**
 * 删除红外类型
 * @param record_id
 */
export async function delInfraredCategory(record_id: any) {
  return request(`/web/v1/infrared_category/${record_id}`, {
    method: 'DELETE',
  });
}

/**
 * 新增类型
 * @param params
 */
export async function createInfraredCategory(params: object) {
  return request(`/web/v1/infrared_category`, {
    method: 'POST',
    data: params,
  });
}

/**
 * 编辑类型
 * @param params
 */
export async function updateInfraredCategory(params: { record_id: string }) {
  return request(`/web/v1/infrared_category/${params.record_id}`, {
    method: 'PUT',
    data: params,
  });
}
