import request from '@/utils/request'
  
/**
 * data获取个人地址列表
 */
export function queryCustAddrApi(data) {
  return request({
    url: '/smart-canteen/user_addr/list',
    method: 'get',
    params: data
  })
}

/**
 * 新增个人地址
 */
export function addCustAddrForAppApi(data) {
  return request({
    url: '/smart-canteen/user_addr',
    method: 'post',
    data
  })
}
/**
 * 删除个人地址
 */
export function deleteCustAddrForAppApi(data) {
  return request({
    url: '/smart-canteen/user_addr/del',
    method: 'post',
    data
  })
}
 

/**
 * data获取单个地址
 */
export function queryChildPlaceByIdApi(data) {
  return request({
    url: '/smart-canteen/custPlace/queryChildPlaceById',
    method: 'post',
    data
  })
}

/**
 * 编辑个人地址
 */
export function updateCustAddrApi(data) {
  return request({
    url: '/smart-canteen/user_addr/edit',
    method: 'post',
    data
  })
} 

/**
 * 设置默认地址
 */
export function updateDefaultAddrApi(data) {
  return request({
    url: '/smart-canteen/user_addr/setDefault',
    method: 'post',
    data
  })
} 

