import request from "@/utils/request";

// 获取首页统计
export function getAllCount() {
  return request({
    url: "/app/map/getAllCount",
    method: "get",
  });
}
// 分布专家信息
export function getExpert() {
  return request({
    url: "/v1/index/distribution/expert",
    method: "get",
  });
}
// 分布实验室信息
export function laboratory() {
  return request({
    url: "/v1/index/distribution/laboratory",
    method: "get",
  });
}

// 分布需求信息
export function demand() {
  return request({
    url: "/v1/index/distribution/demand",
    method: "get",
  });
}

// 分布技术成果信息
export function achievement() {
  return request({
    url: "/v1/index/distribution/achievement",
    method: "get",
  });
}

// 分布技术成果信息
export function company() {
  return request({
    url: "/v1/index/distribution/company",
    method: "get",
  });
}

// 获取banner
export function banner(params) {
  return request({
    url: "/app/config/list",
    method: "get",
    params,
  });
}

// 行业领域信息
export function industry() {
  return request({
    url: "/v1/sys/industry",
    method: "get",
  });
}
// 客户端搜索
export function search(params) {
  return request({
    url: "/search/search",
    method: "get",
    params,
  });
}
// 客户端专利搜索结果详情
export function searchPatentDetail(id) {
  return request({
    url: `/search/patent/${id}`,
    method: "get",
  });
}
// 客户端专利搜索结果详情
export function searchEnterpriseDetail(id) {
  return request({
    url: `/search/enterprise/${id}`,
    method: "get",
  });
}

// 获取[省]专家分布
export function countExpertByProvince() {
  return request({
    url: "/app/map/countExpertByProvince",
    method: "get",
  });
}
// 获取[市]专家分布
export function countExpertByCity(provinceCode) {
  return request({
    url: "/app/map/countExpertByCity",
    method: "get",
    params: {
      provinceCode,
    },
  });
}
// 获取[县]专家分布
export function countExpertByArea(cityCode) {
  return request({
    url: "/app/map/countExpertByArea",
    method: "get",
    params: {
      cityCode,
    },
  });
}
// 获取[省]企业分布
export function countEnterpriseByProvince() {
  return request({
    url: "/app/map/countEnterpriseByProvince",
    method: "get",
  });
}
// 获取[市]企业分布
export function countEnterpriseByCity(provinceCode) {
  return request({
    url: "/app/map/countEnterpriseByCity",
    method: "get",
    params: {
      provinceCode,
    },
  });
}
// 获取[县]企业分布
export function countEnterpriseByArea(cityCode) {
  return request({
    url: "/app/map/countEnterpriseByArea",
    method: "get",
    params: {
      cityCode,
    },
  });
}
// 获取[省]需求分布
export function countDemandByProvince() {
  return request({
    url: "/app/map/countDemandByProvince",
    method: "get",
  });
}
// 获取[市]需求分布
export function countDemandByCity(provinceCode) {
  return request({
    url: "/app/map/countDemandByCity",
    method: "get",
    params: {
      provinceCode,
    },
  });
}
// 获取[县]需求分布
export function countDemandByArea(cityCode) {
  return request({
    url: "/app/map/countDemandByArea",
    method: "get",
    params: {
      cityCode,
    },
  });
}
// 获取[省]成果分布
export function countAchievementByProvince() {
  return request({
    url: "/app/map/countAchievementByProvince",
    method: "get",
  });
}
// 获取[市]成果分布
export function countAchievementByCity(provinceCode) {
  return request({
    url: "/app/map/countAchievementByCity",
    method: "get",
    params: {
      provinceCode,
    },
  });
}
// 获取[县]成果分布
export function countAchievementByArea(cityCode) {
  return request({
    url: "/app/map/countAchievementByArea",
    method: "get",
    params: {
      cityCode,
    },
  });
}
