import request from '@/utils/request';
import { MapQuery } from './type';

// 加载粤政图服务
export const getMapProduct = (serviceCode: string, params) => {
  return request({
    url: '/api/oneShare/proxyHandler/mm/' + serviceCode,
    method: 'get',
    params: params
  });
};

export const getMapProduct2 = (query: MapQuery) => {
  return request({
    url: '/gmap/proxyHandler',
    method: 'get',
    params: query
  });
};

// 动态接口请求
export const getRescueMateria = (url: string) => {
  return request({
    url: '/api/gateway/v1/' + url,
    method: 'get'
  });
};
//全域地图-其他-点位信息
export const getPointInfo = (pointType: string) => {
  return request({
    url: '/api/gateway/v1/get_point_info',
    method: 'post',
    data: {
      option: pointType
    }
  });
};
// 全域地图-其他-点位信息-详情列表
export const getPointInfoList = (data) => {
  return request({
    url: '/api/gateway/v1/get_point_info_list',
    method: 'post',
    data: data
  });
};

// 空间分析接口 多边形
export const getEmergencyExpertNum = (params) => {
  return request({
    url: '/api/gateway/v1/emergency_expert_num',
    method: 'post',
    data: params
  });
};

export const getSpatialAnalysis = (params) => {
  return request({
    url: '/api/spatial_analysis/get_info',
    method: 'post',
    data: params
  });
};

// 空间分析接口 圆形
export const getEmergencyExpertNumRound = (params) => {
  return request({
    url: '/api/gateway/v1/emergency_expert_num_round',
    method: 'post',
    data: params
  });
};

// 模糊搜索-专家
export const getEmergencyExpertNameLike = (params) => {
  return request({
    url: '/api/gateway/v1/emergency_expert_name_like',
    method: 'post',
    data: params
  });
};

// 获取周围视频点位接口
export const getVideoInfo = (params) => {
  return request({
    url: '/api/gateway/v1/get_video_info',
    method: 'post',
    data: params
  });
};
