/*
 * @Descripttion: HJ
 * @Company: 思宏科技
 * @version: v1.0
 * @Author: HJ
 * @Date: 2021-06-09 15:19:51
 * @LastEditors: HJ
 * @LastEditTime: 2021-06-17 12:06:11
 */
import request from "../../src/js/request";
import { _ADDRESS } from "../base-api";

// 新增地址
export const fhControlAddress = (data) =>
  request({ url: `${_ADDRESS}`, method: "post", data });

// 获取收货地址列表
export const fhGetAddressList = () =>
  request({
    url: `${_ADDRESS}`,
  });

// 获取一个地址详情
export const fhGetAddressDetail = (id) =>
  request({
    url: `${_ADDRESS}/${id}`,
  });

// 删除一个地址
export const fhDeleteAddress = (id) =>
  request({
    url: `${_ADDRESS}/${id}`,
    method: "delete",
  });

// 编辑地址
export const fhEditAddress = (id, data) =>
  request({ url: `${_ADDRESS}/${id}`, method: "put", data });
