import { useRequest } from '@/use/useHttp'

/**
 *  获取地址列表
 * @returns
 */
export const addressListApi = () => {
  return useRequest({
    url: '/v1/mall/address/list',
    method: 'get',
  })
}

/**
 *  添加地址
 * @returns
 */
export const addressAddApi = () => {
  return useRequest({
    url: '/v1/mall/address',
    method: 'post',
  })
}

/**
 *  地址详情
 * @returns
 */
export const addressDetailApi = () => {
  return useRequest({
    url: '/v1/mall/address',
    method: 'get',
  })
}

/**
 *  地址编辑
 * @returns
 */
export const addressEditApi = () => {
  return useRequest({
    url: '/v1/mall/address',
    method: 'put',
  })
}

/**
 *  地址删除
 * @returns
 */
export const addressDeleteApi = () => {
  return useRequest({
    url: '/v1/mall/address',
    method: 'delete',
  })
}
