sellerOrder.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import { requestApi } from '../util/network'
  2. // 获取订单列表
  3. export const getOrderList =
  4. (params, order_sn, state_type) =>
  5. requestApi(
  6. '/Sellerorder/order_list',
  7. 'POST',
  8. {
  9. 'order_sn': order_sn,
  10. 'state_type': state_type,
  11. 'page': params.page,
  12. 'per_page': params.per_page
  13. },
  14. 'seller'
  15. )
  16. // 获取订单信息
  17. export const getOrderInfo =
  18. (orderId) =>
  19. requestApi(
  20. '/Sellerorder/order_info',
  21. 'POST',
  22. {
  23. 'order_id': orderId
  24. },
  25. 'seller'
  26. )
  27. // 取消订单
  28. export const cancelOrder =
  29. (orderId, reason) =>
  30. requestApi(
  31. '/Sellerorder/order_cancel',
  32. 'POST',
  33. {
  34. 'order_id': orderId,
  35. 'reason': reason
  36. },
  37. 'seller'
  38. )
  39. // 订单发货
  40. export const sendOrder =
  41. (orderId, shippingExpressId, shippingCode, daddressId) =>
  42. requestApi(
  43. '/Sellerorder/order_deliver_send',
  44. 'POST',
  45. {
  46. 'order_id': orderId,
  47. 'shipping_express_id': shippingExpressId,
  48. 'shipping_code': shippingCode,
  49. 'daddress_id': daddressId
  50. },
  51. 'seller'
  52. )
  53. // 修改商品价格
  54. export const editGoodsPrice =
  55. (orderId, price) =>
  56. requestApi(
  57. '/Sellerorder/order_spay_price',
  58. 'POST',
  59. {
  60. 'order_id': orderId,
  61. 'order_fee': price
  62. },
  63. 'seller'
  64. )
  65. // 修改运费
  66. export const editShippingFee =
  67. (orderId, price) =>
  68. requestApi(
  69. '/Sellerorder/order_ship_price',
  70. 'POST',
  71. {
  72. 'order_id': orderId,
  73. 'shipping_fee': price
  74. },
  75. 'seller'
  76. )
  77. // 物流跟踪
  78. export const getOrderDeliver =
  79. (orderId) =>
  80. requestApi(
  81. '/Sellerorder/search_deliver',
  82. 'POST',
  83. {
  84. 'order_id': orderId
  85. },
  86. 'seller'
  87. )