import request from '@/utils/request'

// 查询省市区列表
export function listMallRegion(query) {
  return request({
    url: '/mall/mallRegion/list',
    method: 'get',
    params: query
  })
}

// 查询省市区树列表
export function getRegionSelectList(query) {
  return request({
    url: '/mall/mallRegion/selectList',
    method: 'get'
  })
}

// 查询省市区详细
export function getMallRegion(id) {
  return request({
    url: '/mall/mallRegion/' + id,
    method: 'get'
  })
}

// 新增省市区
export function addMallRegion(data) {
  return request({
    url: '/mall/mallRegion',
    method: 'post',
    data: data
  })
}

// 修改省市区
export function updateMallRegion(data) {
  return request({
    url: '/mall/mallRegion',
    method: 'put',
    data: data
  })
}

// 删除省市区
export function delMallRegion(id) {
  return request({
    url: '/mall/mallRegion/' + id,
    method: 'delete'
  })
}

// 导出省市区
export function exportMallRegion(query) {
  return request({
    url: '/mall/mallRegion/export',
    method: 'get',
    params: query
  })
}
