mall-uniapp/sheep/api/member/address.js

46 lines
905 B
JavaScript
Raw Normal View History

import request from '@/sheep/request';
2023-12-16 12:02:31 +00:00
const AddressApi = {
// 获得用户收件地址列表
getAddressList: () => {
return request({
url: '/member/address/list',
2023-12-16 12:02:31 +00:00
method: 'GET'
});
},
2023-12-16 12:37:37 +00:00
// 创建用户收件地址
createAddress: (data) => {
return request({
url: '/member/address/create',
2023-12-16 12:37:37 +00:00
method: 'POST',
data
});
},
// 更新用户收件地址
updateAddress: (data) => {
return request({
url: '/member/address/update',
2023-12-16 12:37:37 +00:00
method: 'PUT',
data
});
},
// 获得用户收件地址
getAddress: (id) => {
return request({
url: '/member/address/get',
2023-12-16 12:37:37 +00:00
method: 'GET',
params: { id }
});
},
// 删除用户收件地址
deleteAddress: (id) => {
return request({
url: '/member/address/delete',
2023-12-16 12:37:37 +00:00
method: 'DELETE',
params: { id }
});
},
2023-12-16 12:02:31 +00:00
};
export default AddressApi;