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

/** @description 获取政策法规列表 */
export function getPolicyList() {
  return request<Resp<API.LawDto[]>>(
    api.reportUrl + "/convenienceService/getPolicyList",
    {
      method: "GET",
    }
  );
}

/** @description 获取常见问题列表 */
export function getConsultList() {
  return request<Resp<API.LawDto[]>>(
    api.reportUrl + "/convenienceService/getConsultList",
    {
      method: "GET",
    }
  );
}

/** @description 获取地图点位类型 */
export function getConvenienceServiceType() {
  return request<Resp<API.LocationTypeDto[]>>(
    api.reportUrl + "/convenienceService/getConvenienceServiceType",
    {
      method: "GET",
    }
  );
}

/** @description 获取地图点位列表通过类型 */
export function getMapMakersByType(params: {
  categoryType: string; //类型值
  longitude: string;
  latitude: string;
  searchText: string; //搜索值
}) {
  return request<Resp<API.PointInfoDto[]>>(
    api.reportUrl + "/convenienceService/getConvenienceServiceInfo",
    {
      method: "POST",
      data: params,
    }
  );
}
