/*
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
*
* https://www.mall4j.com/
*
* 未经允许，不可做商业用途！
*
* 版权所有，侵权必究！
*/
import request from '@/utils/request'

export function page (params) {
  return request({
    url: '/mall4cloud_order/mp/area/list',
    method: 'get',
    params
  })
}

export function get (areaId) {
  return request({
    url: '/mall4cloud_order/mp/area',
    method: 'get',
    params: {
      areaId
    }
  })
}

export function listByPid (pid) {
  return request({
    url: '/mall4cloud_order/mp/area/list_by_pid',
    method: 'get',
    params: {
      pid
    }
  })
}

export function getAreaListInfo () {
  return request({
    url: '/mall4cloud_order/mp/area/area_list_info',
    method: 'get'
  })
}

export function save (data) {
  return request({
    url: '/mall4cloud_order/m/area',
    method: 'post',
    data
  })
}

export function update (data) {
  return request({
    url: '/mall4cloud_order/m/area',
    method: 'put',
    data
  })
}

export function deleteById (areaId) {
  return request({
    url: '/mall4cloud_order/m/area',
    method: 'delete',
    params: {
      areaId
    }
  })
}
