import request from '@/utils/request'

// 查询学习中心列表
export function listStudyCenter(query) {
  return request({
    url: '/hezhi/studyCenter/list',
    method: 'get',
    params: query
  })
}

// 查询学习中心详细
export function getStudyCenter(studyCenterId) {
  return request({
    url: '/hezhi/studyCenter/' + studyCenterId,
    method: 'get'
  })
}

// 新增学习中心
export function addStudyCenter(data) {
  return request({
    url: '/hezhi/studyCenter',
    method: 'post',
    data: data
  })
}

// 修改学习中心
export function updateStudyCenter(data) {
  return request({
    url: '/hezhi/studyCenter',
    method: 'put',
    data: data
  })
}

// 删除学习中心
export function delStudyCenter(studyCenterId) {
  return request({
    url: '/hezhi/studyCenter/' + studyCenterId,
    method: 'delete'
  })
}

// 查询学习中心列表
export function getAllStudyCenterList() {
  return request({
    url: '/hezhi/studyCenter/getAllStudyCenterList',
    method: 'get',
  })
}

// 地址逆解析
export function getMapGeocoder(params) {
  return request({
    url: '/hezhi/studyCenter/api/map/geocoder',
    method: 'get',
    params: params
  })
}
