address.js 994 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import request from '@/utils/request'
  2. export function getAddressList(data) {
  3. return request({
  4. url: '/api/address/list',
  5. method: 'get',
  6. data
  7. });
  8. }
  9. export function addressEdit(data) {
  10. return request({
  11. url: '/api/address/edit',
  12. method: 'post',
  13. data
  14. });
  15. }
  16. // 删除地址
  17. export function addressDel(data) {
  18. return request({
  19. url: '/api/address/del',
  20. method: 'post',
  21. data
  22. });
  23. }
  24. // 设为默认地址
  25. export function setAddressDefault(data) {
  26. return request({
  27. url: '/api/address/default/set',
  28. method: 'post',
  29. data
  30. });
  31. }
  32. // 判断地址是否超出配送距离
  33. export function check_address(data) {
  34. return request({
  35. url: '/api/check_address',
  36. method: 'post',
  37. data
  38. });
  39. }
  40. // 获取拼团地址
  41. export function pinkAddress(data) {
  42. return request({
  43. url: '/api/address/detail/pink',
  44. method: 'get',
  45. data
  46. });
  47. }
  48. // 新增或修改拼团地址
  49. export function pink_edit(data) {
  50. return request({
  51. url: '/api/address/pink_edit',
  52. method: 'post',
  53. data
  54. });
  55. }