You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.0 KiB
59 lines
1.0 KiB
import request from "@/utils/request"; |
|
import {host} from "@/config/host"; |
|
|
|
/** |
|
* 获取地址列表 |
|
* @param data |
|
* @returns {Promise | Promise<unknown>} |
|
*/ |
|
export function getAddressList(data){ |
|
return request({ |
|
url:`${host}/user/address-list`, |
|
method: 'post', |
|
data:data |
|
}); |
|
} |
|
|
|
/** |
|
* 删除地址 |
|
* @param id |
|
* @returns {Promise | Promise<unknown>} |
|
*/ |
|
export function delAddress(id){ |
|
return request({ |
|
url:`${host}/user/address-del`, |
|
method: 'post', |
|
data:{ |
|
id |
|
} |
|
}); |
|
} |
|
|
|
/** |
|
* 获取地址详情 |
|
* @param id |
|
* @returns {Promise | Promise<unknown>} |
|
*/ |
|
export function getDetail(id){ |
|
return request({ |
|
url:`${host}/user/address-info`, |
|
method:"post", |
|
data:{ |
|
id |
|
} |
|
}); |
|
} |
|
|
|
/** |
|
* 更新地址信息 |
|
* @param data |
|
* @returns {Promise | Promise<unknown>} |
|
*/ |
|
export function saveAddress(data){ |
|
return request({ |
|
url:`${host}/user/address-upinfo`, |
|
method:'post', |
|
data:data |
|
}) |
|
} |
|
|
|
|