import { request } from '@umijs/max';

const IS_PROD = process.env.NODE_ENV === 'production' ? true : false;
export const reqBaseUrl = IS_PROD
  ? '/cd-comprehensive/apis/city-sjdz-base'
  : '/sjdz/city-sjdz-base';

const urlProxyApis = (url: string) => {
  return `${reqBaseUrl}${url}`;
};

//获取数据底座数据
export const getSjdzInfoData = (data: any): Promise<any> => {
  return request(urlProxyApis(`/sjdzInterfaceInfo/getSjdzInfoData`), {
    data,
    method: 'post',
    timeout: 300000,
  });
};
/** 感知 */
export const getGzInfoData = (data: any): Promise<any> => {
  return request(urlProxyApis(`/sjdzInterfaceInfo/getGzInfoData`), {
    data,
    method: 'post',
    timeout: 300000,
  });
};

//获取数据底座数据高发时间
export const getQzGfData = (data: any): Promise<any> => {
  return request(urlProxyApis(`/sjdzInterfaceInfo/getQzGfData`), {
    data,
    method: 'post',
    timeout: 300000,
  });
};

//获取数据底座数据
export const getWgjzInfoData = (data: any): Promise<any> => {
  return request(urlProxyApis(`/sjdzInterfaceInfo/getWgjzInfoData`), {
    data,
    method: 'post',
    timeout: 300000,
  });
};

// 获取门户概况数据
export const getMzhsData = (data: any): Promise<any> => {
  return request(urlProxyApis(`/sjdzInterfaceInfo/getMzhsData`), {
    data,
    method: 'post',
    timeout: 300000,
  });
};
