import request from '@/utils/request/index.js'
/**
 * 预警上报模块
 */

// 预警上报数据请求父类函数
const baseRequest = async (url, data) => {
	const res = await request.post(`api/api_gateway?method=after_sale.after_sale_manage.${url}`, data);
	return res?.data;
}

// 设备详情
export const getAftersaleInfo = (data) => baseRequest('aftersale_infos',data);

// 上传图片、视频接口
export const uploadFile = (data) => request.post('api/v2/util/upload/img',data);

// 预警保存
export const saveAftersaleInfo = (data) => baseRequest('aftersale_info_save',data);