import request from '@/utils/request'
// 获取用户默认地址
export function getUserDefaultLoc(data) {
    return request({
        url: '/cust/map/loc',
        method: 'get',
        params: data
    })
}

// 坐标和半径搜索用户数量
export function searchCircleCount(query) {
    return request({
        url: '/cust/map/search/circle/count',
        method: 'post',
        data: query
    })
}

// 坐标和半径查询用户列表
export function searchCircleList(query) {
    return request({
        url: '/cust/map/search/circle',
        method: 'post',
        data: query
    })
}

// 多边形搜索用户数量
export function searchPolygonCount(query) {
    return request({
        url: '/cust/map/search/polygon/count',
        method: 'post',
        data: query
    })
}

// 多边形查询用户列表
export function searchPolygonList(query) {
    return request({
        url: '/cust/map/search/polygon',
        method: 'post',
        data: query
    })
}

// 坐标和半径导出用户列表
export function downloadCircleList(data) {
    return request({
        url: '/cust/map/export/circle',
        method: 'post',
        data: data,
    })
}

// 多边形导出用户列表
export function downloadPolygonList(data) {
    return request({
        url: '/cust/map/export/polygon',
        method: 'post',
        data: data,
    })
}

// 导出勾选用户列表
export function downloadSelectList(data) {
    return request({
        url: '/cust/map/export/select',
        method: 'post',
        data: data,
        responseType: 'blob'
    })
}

// 获取币种
export function getMoneyTypeList(data) {
    return request({
        url: '/cust/map/metric/cur',
        method: 'get',
        params: data
    })
}

 // 通用下载
 export function commonDownload(data) {
    return request({
      url: '/file/opt/download',
      method: 'get',
      params: data,
      responseType: 'blob'
    })
  }

  // 获取企业类型
export function getQiYeTypeList(data) {
    return request({
        url: '/cust/map/metric/company/type',
        method: 'get',
        params: data
    })
}

  // 获取下载中心列表
export function getDownCenter(data) {
    return request({
        url: '/notification/download/list',
        method: 'get',
        params: data
    })
}

// 获取下载中心列表
export function getZzzsDict(data) {
  return request({
      url: '/cust/map/metric/zzzs',
      method: 'get',
      params: data
  })
}
// 获取下载中心列表
export function getDownCenterList(data) {
  return request({
      url: '/download/list',
      method: 'get',
      params: data
  })
}

 // 下载中心列表下载
 export function downCenterDownload(data) {
    return request({
      url: '/download/visit/record',
      method: 'get',
      params: data,
      responseType: 'blob'
    })
  }

// 获取模板
export function getTemplateList(data) {
  return request({
      url: '/cust/map/search/template/get',
      method: 'get',
      params: data
  })
}

// 保存查询模板
export function saveTemplate(data) {
  return request({
      url: '/cust/map/search/template/save',
      method: 'POST',
      data: data
  })
}

// 删除查询模板
export function deleteTemplate(data) {
  return request({
      url: '/cust/map/search/template/delete',
      method: 'POST',
      params: data
  })
}