import request from '@/utils/request';

// 农户列表
export const getAssocList = (query) => {
  return request({
    url: '/wpr/assoc/list',
    method: 'get',
    params: query
  });
};

// 新增

export const addAssoc = (data) => {
  return request({
    url: '/wpr/assoc/add',
    method: 'post',
    data
  });
};

// 修改

export const editAssoc = (data) => {
  return request({
    url: '/wpr/assoc/edit',
    method: 'put',
    data
  });
};

// 删除

export const deleteAssoc = (params) => {
  return request({
    url: '/wpr/assoc/delete/',
    method: 'delete',
    params
  });
};

// 详情

export const getFarmerDetail = (query) => {
  return request({
    url: '/wpr/farmer/info',
    method: 'get',
    params: query
  });
};
