/**
 *  手太欠
 *  5g获客星光网 - 我的地址
 */

import {req} from "../request"

const create    = data => req({url: "user/addresses/create", data: data}) //获取省市区层级信息
const index     = () => req({url: "user/addresses"}) //我的地址列表
const info      = (address_id) => req({url: "user/addresses/" + address_id}) //地址列表-详情
const add       = data => req({url: "user/addresses", method: "POST", data: data}) //新增-地址列表
const revise    = (address_id, data) => req({url: "user/addresses/" + address_id, method: "PUT", data: data}) //修改-地址列表
const del       = (address_id) => req({url: "user/addresses/" + address_id, method: "DELETE"}) //地址列表-删除
const def       = (address_id) => req({url: "user/addresses/" + address_id + "/default", method: "POST"}) //地址列表-默认

export default({
    create,
    index,
    info,
    add,
    revise,
    del,
    def
})
