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

/**
 * 查询小区管理列表数据
 * @param param
 */
export async function queryCommunity(param: object) {
  return request(`/web/v1/report_community?${stringify(param)}`);
}

/**
 * 新增小区
 * @param params
 */
export async function createCommunity(params: object) {
  return request(`/web/v1/report_community`, {
    method: 'POST',
    data: params,
  });
}

/**
 * 编辑小区
 * @param params
 */
export async function updateCommunity(params: object) {
  return request(`/web/v1/report_community`, {
    method: 'POST',
    data: params,
  });
}

/**
 * 删除小区
 * @param record_id
 */
export async function delCommunity(record_id: any) {
  return request(`/web/v1/report_community/${record_id}`, {
    method: 'DELETE',
  });
}
