delivery.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import https from '@/plugins/luch-request_0.0.7/request'
  2. /**
  3. * 发货与收货地址
  4. */
  5. export const address = data => {
  6. return https.post('/delivery/address', data)
  7. }
  8. /**
  9. * 获取配送平台报价
  10. */
  11. export const getDeliveryQuotes = data => {
  12. return https.post('/delivery/all-delivery-quotes', data) //?XDEBUG_SESSION_START=PHPSTORM
  13. }
  14. /**
  15. * 批发快捷开单 -- 获取跑腿配送报价
  16. */
  17. export const quickOrderAllDeliveryQuotes = data => {
  18. return https.post('/delivery/quick-order-delivery-quotes', data)
  19. }
  20. /**
  21. * 创建配送单
  22. */
  23. export const createDeliveryOrder = data => {
  24. return https.post('/delivery/create-order', data)
  25. }
  26. /**
  27. * 获取配送单详情
  28. */
  29. export const deliveryOrderDetail = data => {
  30. return https.get('/delivery/order-detail', data)
  31. }
  32. /**
  33. * 取消配送单
  34. */
  35. export const cancelDeliveryOrder = data => {
  36. return https.post('/delivery/cancel-order', data)
  37. }
  38. /**
  39. * 获取可用订单取消原因
  40. */
  41. export const getCancelReason = data => {
  42. return https.post('/delivery/cancel-reason', data)
  43. }
  44. /**
  45. * 获取平台列表
  46. */
  47. export const getPlatformList = data => {
  48. return https.get('/delivery/list')
  49. }
  50. /**
  51. * 获取指定平台的授权链接
  52. */
  53. export const getAuthUrl = (platformId) => {
  54. return https.get(`/delivery/get-auth-url?platformId=${platformId}`)
  55. }
  56. /**
  57. * 取消授权
  58. */
  59. export const cancelAuth = data => {
  60. return https.get('/delivery/cancel-auth', data)
  61. }
  62. /**
  63. * 添加小费
  64. */
  65. export const addTip = data => {
  66. return https.post('/delivery/add-tip', data)
  67. }