import api from "./core/api";
import request from "./core/request";

/** 提交上报的信息 */
export function submitUserReport(params: {
  /** 1投诉、2建议、3咨询、4举报 */
  type: 1 | 2 | 3 | 4;
  content: string;
  annex1?: string;
  annex2?: string;
  annex3?: string;
  anonymousFlag: 1 | 0;
}) {
  return request<Resp<any>>(
    api.reportUrl + "/citizenServices/saveCitizenInfo",
    {
      method: "POST",
      data: params,
    }
  );
}
/** 获取用户上报记录 */
export function getReportList(params: {
  /** 1投诉、2建议、3咨询、4举报 */
  type: 1 | 2 | 3 | 4;
  page: number;
  count: number;
}) {
  return request<Resp<API.Pagination<API.ReportRecordDto>>>(
    api.reportUrl + "/citizenServices/getCitizenServicesInfoList",
    {
      method: "POST",
      params: params,
    }
  );
}
/** @description 获取个人中心统计信息 */
export function getPersonalCenterStatistics() {
  return request<Resp<API.PersonalCenterStatisticsDto[]>>(
    api.reportUrl + "/citizenServices/personalCenterStatistics",
    {
      method: "POST",
    }
  );
}
