import request from '@/utils/request';

// 列表
export const getSubsidyPolicy = (query) => {
  return request({
    url: '/wpr/subsidypolicy/list',
    method: 'get',
    params: query
  });
};
// 新增
export const addSubsidyPolicy = (data) => {
  return request({
    url: '/wpr/subsidypolicy/add',
    method: 'post',
    data
  });
};
// 图片上传
export const addUploadImg = () => {
  return request({
    url: '/wpr/subsidypolicy/preview/upload',
    method: 'post',
    data
  });
};
// 修改
export const editSubsidyPolicy = (data) => {
  return request({
    url: '/wpr/subsidypolicy/edit',
    method: 'put',
    data
  });
};

// 删除
export const deleteSubsidyPolicy = (farmerIds) => {
  return request({
    url: '/wpr/subsidypolicy/delete',
    method: 'delete',
    params: farmerIds
  });
};
