2023-06-25 14:10:27 +00:00
|
|
|
import request from "@/utils/request.js";
|
|
|
|
|
2023-06-26 12:06:29 +00:00
|
|
|
// 获得用户收件地址
|
|
|
|
export function getAddress(id) {
|
|
|
|
return request.get('app-api/member/address/get', {
|
|
|
|
id
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-06-26 12:52:27 +00:00
|
|
|
// 获得默认的用户收件地址
|
|
|
|
export function getDefaultUserAddress() {
|
|
|
|
return request.get('app-api/member/address/get-default', {});
|
|
|
|
}
|
|
|
|
|
2023-06-25 14:10:27 +00:00
|
|
|
// 获得用户收件地址列表
|
|
|
|
export function getAddressList() {
|
|
|
|
return request.get('app-api/member/address/list', {});
|
|
|
|
}
|
|
|
|
|
2023-06-26 12:06:29 +00:00
|
|
|
// 创建用户收件地址
|
|
|
|
export function createAddress(data) {
|
|
|
|
return request.post('app-api/member/address/create', data);
|
|
|
|
}
|
|
|
|
|
2023-06-25 14:10:27 +00:00
|
|
|
// 更新用户收件地址
|
|
|
|
export function updateAddress(data) {
|
|
|
|
return request.put('app-api/member/address/update', data);
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除用户收件地址
|
|
|
|
export function deleteAddress(id) {
|
|
|
|
return request.delete('app-api/member/address/delete?id=' + id, {});
|
|
|
|
}
|