import request from "@/utils/request"; import {host} from "@/config/host"; /** * 获取地址列表 * @param data * @returns {Promise | Promise} */ export function getAddressList(data){ return request({ url:`${host}/user/address-list`, method: 'post', data:data }); } /** * 删除地址 * @param id * @returns {Promise | Promise} */ export function delAddress(id){ return request({ url:`${host}/user/address-del`, method: 'post', data:{ id } }); } /** * 获取地址详情 * @param id * @returns {Promise | Promise} */ export function getDetail(id){ return request({ url:`${host}/user/address-info`, method:"post", data:{ id } }); } /** * 更新地址信息 * @param data * @returns {Promise | Promise} */ export function saveAddress(data){ return request({ url:`${host}/user/address-upinfo`, method:'post', data:data }) }