sellerAddress.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { requestApi } from '../util/network'
  2. // 获取发货地址列表
  3. export const getAddressList =
  4. () =>
  5. requestApi(
  6. '/Sellerdeliverset/address_list',
  7. 'POST',
  8. {
  9. },
  10. 'seller'
  11. )
  12. // 获取单条发货地址信息
  13. export const getAddressInfo =
  14. (addressId) =>
  15. requestApi(
  16. '/Sellerdeliverset/address_info',
  17. 'POST',
  18. {
  19. 'address_id': addressId
  20. },
  21. 'seller'
  22. )
  23. // 编辑用户发货地址
  24. export const editAddress =
  25. (data, addressId) =>
  26. requestApi(
  27. '/Sellerdeliverset/address_add',
  28. 'POST',
  29. {
  30. 'address_id': addressId,
  31. 'seller_name': data.seller_name,
  32. 'area_id': data.area_id,
  33. 'city_id': data.city_id,
  34. 'area_info': data.area_info,
  35. 'address': data.daddress_detail,
  36. 'telphone': data.daddress_telphone,
  37. 'is_default': data.daddress_isdefault
  38. },
  39. 'seller'
  40. )
  41. // 删除用户发货地址
  42. export const delAddress =
  43. (addressId) =>
  44. requestApi(
  45. '/Sellerdeliverset/address_del',
  46. 'POST',
  47. {
  48. 'address_id': addressId
  49. },
  50. 'seller'
  51. )