memberCompliant.js 2.2 KB

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