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

/**
 * 查询售后支持列表
 * @param param
 */
export async function queryAfterSalesSupport(param: object) {
  return request(`/web/v1/after_sales?${stringify(param)}`);
}

/**
 * 查询售后支持详情
 * @param record_id
 */
export async function queryAfterSalesSupportDetail(record_id: string) {
  return request(`/web/v1/after_sales/${record_id}`);
}

/**
 * 导出售后支持列表
 * @param params
 */
export async function queryExport(params: any) {
  console.log('params', params);
  return request(`/web/v1/after_sales/export?${stringify(params)}`, {
    method: 'GET',
    responseType: 'blob',
  });
}
