mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
commit message
This commit is contained in:
60
buyer/src/api/address.js
Normal file
60
buyer/src/api/address.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import request, {
|
||||
Method, commonUrl
|
||||
} from '@/plugins/request.js';
|
||||
|
||||
// 会员收货地址列表
|
||||
export function memberAddress () {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
// 添加收货地址
|
||||
export function newMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
needToken: true,
|
||||
method: Method.POST,
|
||||
data: params
|
||||
});
|
||||
}
|
||||
|
||||
// 编辑收货地址
|
||||
export function editMemberAddress (params) {
|
||||
return request({
|
||||
url: '/buyer/memberAddress',
|
||||
needToken: true,
|
||||
method: Method.PUT,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 删除收货地址
|
||||
export function delMemberAddress (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/delById/${id}`,
|
||||
needToken: true,
|
||||
method: Method.DELETE
|
||||
});
|
||||
}
|
||||
|
||||
// 根据id获取会员地址详情
|
||||
export function getAddrDetail (id) {
|
||||
return request({
|
||||
url: `/buyer/memberAddress/get/${id}`,
|
||||
needToken: true,
|
||||
method: Method.GET
|
||||
});
|
||||
}
|
||||
|
||||
// 传给后台citycode 获取城市街道等id
|
||||
export function handleRegion (params) {
|
||||
return request({
|
||||
url: `${commonUrl}/common/region/region`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user