address.js 788 B

123456789101112131415
  1. //请求工具参考https://ext.dcloud.net.cn/plugin?id=392
  2. const { http } = uni.$u
  3. //获得用户收件地址列表
  4. export const getAddressList = params => http.get('/member/address/list', params)
  5. //创建用户收件地址
  6. export const createAddress = data => http.post('/member/address/create', data)
  7. //通过ID获得用户收件地址
  8. export const getAddressById = params => http.get('/member/address/get', { params })
  9. //获得默认的用户收件地址
  10. export const getDefaultUserAddress = params => http.get('/member/address/get-default', { params })
  11. //更新用户收件地址
  12. export const updateAddress = params => http.put('/member/address/update', params)
  13. //删除用户收件地址
  14. export const deleteAddress = params => http.delete('/member/address/delete', {}, { params })