vue-pro/yudao-ui-app/api/address.js

16 lines
788 B
JavaScript
Raw Normal View History

2022-05-01 22:39:16 +08:00
//请求工具参考https://ext.dcloud.net.cn/plugin?id=392
const { http } = uni.$u
//获得用户收件地址列表
export const getAddressList = params => http.get('/member/address/list', params)
2022-05-01 22:39:16 +08:00
//创建用户收件地址
export const createAddress = data => http.post('/member/address/create', data)
2022-05-01 22:39:16 +08:00
//通过ID获得用户收件地址
export const getAddressById = params => http.get('/member/address/get', { params })
2022-05-01 22:39:16 +08:00
//获得默认的用户收件地址
export const getDefaultUserAddress = params => http.get('/member/address/get-default', { params })
2022-05-01 22:39:16 +08:00
//更新用户收件地址
export const updateAddress = params => http.put('/member/address/update', params)
2022-05-01 22:39:16 +08:00
//删除用户收件地址
export const deleteAddress = params => http.delete('/member/address/delete', {}, { params })