zyejMAll-mobile/sheep/api/member/address.js

71 lines
1.4 KiB
JavaScript
Raw Normal View History

2024-08-07 10:31:42 +08:00
import request from '@/sheep/request';
const AddressApi = {
// 获得用户收件地址列表
getAddressList: () => {
return request({
url: '/member/address/list',
2024-08-07 21:40:27 +08:00
method: 'GET',
2024-08-07 10:31:42 +08:00
});
},
// 创建用户收件地址
createAddress: (data) => {
return request({
url: '/member/address/create',
method: 'POST',
data,
custom: {
showSuccess: true,
2024-08-07 21:40:27 +08:00
successMsg: '保存成功',
2024-08-07 10:31:42 +08:00
},
});
},
// 更新用户收件地址
updateAddress: (data) => {
return request({
url: '/member/address/update',
method: 'PUT',
data,
custom: {
showSuccess: true,
2024-08-07 21:40:27 +08:00
successMsg: '更新成功',
2024-08-07 10:31:42 +08:00
},
});
},
// 获得用户收件地址
getAddress: (id) => {
return request({
url: '/member/address/get',
method: 'GET',
2024-08-07 21:40:27 +08:00
params: { id },
2024-08-07 10:31:42 +08:00
});
},
// 删除用户收件地址
deleteAddress: (id) => {
return request({
url: '/member/address/delete',
method: 'DELETE',
2024-08-07 21:40:27 +08:00
params: { id },
});
},
// 文章列表
textList: (id) => {
return request({
url: '/promotion/article/list',
method: 'GET',
params: { id },
});
},
// 文章列表详情
textListDetail: (id) => {
return request({
url: '/promotion/article/get',
method: 'GET',
params: { id },
2024-08-07 10:31:42 +08:00
});
},
};
export default AddressApi;