memberOrder.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import { requestApi } from '../util/network'
  2. // 获取用户订单列表
  3. export const getOrderList =
  4. (parmas, stateType, orderKey,keyword) =>
  5. requestApi(
  6. '/Memberorder/order_list',
  7. 'POST',
  8. {
  9. 'page': parmas.page,
  10. 'per_page': parmas.per_page,
  11. 'state_type': stateType,
  12. 'order_key': orderKey,
  13. 'keyword':keyword
  14. },
  15. 'member'
  16. )
  17. // 获取订单信息
  18. export const getOrderInfo =
  19. (orderId) =>
  20. requestApi(
  21. '/Memberorder/order_info',
  22. 'POST',
  23. {
  24. 'order_id': orderId
  25. },
  26. 'member'
  27. )
  28. // 订单评价
  29. export const saveOrderEvaluate =
  30. (orderId, result) =>
  31. requestApi(
  32. '/Memberevaluate/save',
  33. 'POST',
  34. Object.assign(
  35. {
  36. 'order_id': orderId
  37. },
  38. result),
  39. 'member'
  40. )
  41. // 获取评价信息
  42. export const getOrderEvaluateInfo =
  43. (orderId) =>
  44. requestApi(
  45. '/Memberevaluate/index',
  46. 'POST',
  47. {
  48. 'order_id': orderId
  49. },
  50. 'member'
  51. )
  52. // 取消订单
  53. export const cancelOrder =
  54. (orderId) =>
  55. requestApi(
  56. '/Memberorder/order_cancel',
  57. 'POST',
  58. {
  59. 'order_id': orderId
  60. },
  61. 'member'
  62. )
  63. // 删除订单
  64. export const deleteOrder =
  65. (orderId) =>
  66. requestApi(
  67. '/Memberorder/order_delete',
  68. 'POST',
  69. {
  70. 'order_id': orderId
  71. },
  72. 'member'
  73. )
  74. // 订单收货
  75. export const receiveOrder =
  76. (orderId) =>
  77. requestApi(
  78. '/Memberorder/order_receive',
  79. 'POST',
  80. {
  81. 'order_id': orderId
  82. },
  83. 'member'
  84. )
  85. // 物流跟踪
  86. export const getOrderDeliver =
  87. (orderId) =>
  88. requestApi(
  89. '/Memberorder/search_deliver',
  90. 'POST',
  91. {
  92. 'order_id': orderId
  93. },
  94. 'member'
  95. )