sellerCompliant.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import { requestApi } from '../util/network'
  2. // 投诉列表
  3. export const getComplaintList =
  4. (params) =>
  5. requestApi(
  6. '/sellercomplain/index',
  7. 'POST',
  8. {
  9. page: params.page,
  10. per_page: params.per_page
  11. },
  12. 'seller'
  13. )
  14. export const getComplaintInfo =
  15. (complain_id) =>
  16. requestApi(
  17. '/sellercomplain/complain_show',
  18. 'POST',
  19. {
  20. complain_id: complain_id
  21. },
  22. 'seller'
  23. )
  24. // 新增投诉
  25. export const addComplaint =
  26. (input_complain_id, content, pic) =>
  27. requestApi(
  28. '/sellercomplain/appeal_save',
  29. 'POST',
  30. {
  31. input_complain_id: input_complain_id,
  32. input_appeal_message: content,
  33. pic_name: pic
  34. },
  35. 'seller'
  36. )
  37. // 取消投诉
  38. export const cancelComplaint =
  39. (order_id) =>
  40. requestApi(
  41. '/sellercomplain/complain_cancel',
  42. 'POST',
  43. {
  44. complain_id: order_id
  45. },
  46. 'seller'
  47. )
  48. // 更新凭证
  49. export const uploadComplaintPic =
  50. (file) =>
  51. requestApi(
  52. '/sellercomplain/upload_pic',
  53. 'POST',
  54. file,
  55. 'seller',
  56. true
  57. )
  58. // 获取公共信息
  59. export const getCommonData =
  60. (order_id, goods_id) =>
  61. requestApi(
  62. '/sellercomplain/get_common_data',
  63. 'POST',
  64. {
  65. order_id: order_id,
  66. goods_id: goods_id
  67. },
  68. 'seller'
  69. )
  70. export const addComplaintTalk =
  71. (complain_id, complain_talk) =>
  72. requestApi(
  73. '/sellercomplain/publish_complain_talk',
  74. 'POST',
  75. {
  76. complain_id: complain_id,
  77. complain_talk: complain_talk
  78. },
  79. 'seller'
  80. )
  81. export const getComplaintTalk =
  82. (complain_id) =>
  83. requestApi(
  84. '/sellercomplain/get_complain_talk',
  85. 'POST',
  86. {
  87. complain_id: complain_id
  88. },
  89. 'seller'
  90. )
  91. export const handleComplain =
  92. (complain_id) =>
  93. requestApi(
  94. '/sellercomplain/apply_handle',
  95. 'POST',
  96. {
  97. input_complain_id: complain_id
  98. },
  99. 'seller'
  100. )