import request from '@/utils/request'

// 查询学校列表
export function listMallSchool(query) {
  return request({
    url: '/mall/mallSchool/list',
    method: 'get',
    params: query
  })
}

// 查询学校详细
export function getMallSchool(schoolId) {
  return request({
    url: '/mall/mallSchool/' + schoolId,
    method: 'get'
  })
}

// 新增学校
export function addMallSchool(data) {
  return request({
    url: '/mall/mallSchool',
    method: 'post',
    data: data
  })
}

// 修改学校
export function updateMallSchool(data) {
  return request({
    url: '/mall/mallSchool',
    method: 'put',
    data: data
  })
}

// 删除学校
export function delMallSchool(schoolId) {
  return request({
    url: '/mall/mallSchool/' + schoolId,
    method: 'delete'
  })
}

// 获取定位列表
export function selectPositionList(){
  return request({
    url: '/mall/mallSchoolPosition/selectPositionList',
    method: 'get'
  })
}

// 获取定位列表
export function selectSuggestList(){
  return request({
    url: '/mall/mallSchoolSuggest/selectSuggestList',
    method: 'get'
  })
}

// 新增登录用户提交
export function submitSchoolUser(data) {
  return request({
    url: '/mall/mallSchool/submitSchoolUser',
    method: 'put',
    data: data
  })
}
