memberInform.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import { requestApi } from '../util/network'
  2. // 投诉列表
  3. export const getInformList =
  4. (params) =>
  5. requestApi(
  6. '/memberinform/index',
  7. 'POST',
  8. {
  9. page: params.page,
  10. per_page: params.per_page
  11. },
  12. 'member'
  13. )
  14. // 新增投诉
  15. export const addInform =
  16. (goods_id, subject, content, pic) =>
  17. requestApi(
  18. '/memberinform/inform_save',
  19. 'POST',
  20. {
  21. inform_goods_id: goods_id,
  22. inform_subject: subject,
  23. inform_content: content,
  24. pic_name: pic
  25. },
  26. 'member'
  27. )
  28. // 取消投诉
  29. export const cancelInform =
  30. (order_id) =>
  31. requestApi(
  32. '/memberinform/inform_cancel',
  33. 'POST',
  34. {
  35. inform_id: order_id
  36. },
  37. 'member'
  38. )
  39. // 更新凭证
  40. export const uploadInformPic =
  41. (file) =>
  42. requestApi(
  43. '/memberinform/upload_pic',
  44. 'POST',
  45. file,
  46. 'member',
  47. true
  48. )
  49. // 获取公共信息
  50. export const getCommonData =
  51. (goods_id) =>
  52. requestApi(
  53. '/memberinform/inform_submit',
  54. 'POST',
  55. {
  56. goods_id: goods_id
  57. },
  58. 'member'
  59. )
  60. export const getInformInfo =
  61. (inform_id) =>
  62. requestApi(
  63. '/memberinform/inform_info',
  64. 'POST',
  65. {
  66. inform_id: inform_id
  67. },
  68. 'member'
  69. )
  70. export const getInformSubject =
  71. (type_id) =>
  72. requestApi(
  73. '/memberinform/get_subject_by_typeid',
  74. 'POST',
  75. {
  76. type_id: type_id
  77. },
  78. 'member'
  79. )