import request from '@/utils/request'

// 查询省份信息
export function getProvinceDataApi(query) {
  return request({
    url: '/common/region/province',
    method: 'get',
    params: query
  })
}
//根据省份信息获取下级节点信息
export function getRegionChildrenApi(id) {
  return request({
    url: `/common/region/${id}/children`,
    method: 'get',
    // params: query
  })
}
//首页数据
export function getIndexDataApi(query) {
  return request({
    url: `/index/report`,
    method: 'get',
    params: query
  })
}
//下载列表项目
export function downloadProjectByIDApi(projectId) {
  return request({
    url: `/project/download/${projectId}`,
    method: 'get'
  })
}
//下载附件
export function downloadEnclosureByIdApi(ids) {
  return request({
    url: `/common/attach/${ids}`,
    method: 'get',
    responseType: 'blob'
  })
}
//校验统一社会信用代码
export function validLicenseApi(license) {
  return request({
    url: `/valid/checkLicense/${license}`,
    headers: {
      isToken: false
    },
    method: 'get',
  })
}
