afterSale.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import request from '@/sheep/request';
  2. const AfterSaleApi = {
  3. // 获得售后分页
  4. getAfterSalePage: (params) => {
  5. return request({
  6. url: `/trade/after-sale/page`,
  7. method: 'GET',
  8. params,
  9. custom: {
  10. showLoading: false,
  11. },
  12. });
  13. },
  14. // 创建售后
  15. createAfterSale: (data) => {
  16. return request({
  17. url: `/trade/after-sale/create`,
  18. method: 'POST',
  19. data,
  20. });
  21. },
  22. // 获得售后
  23. getAfterSale: (id) => {
  24. return request({
  25. url: `/trade/after-sale/get`,
  26. method: 'GET',
  27. params: {
  28. id,
  29. },
  30. });
  31. },
  32. // 取消售后
  33. cancelAfterSale: (id) => {
  34. return request({
  35. url: `/trade/after-sale/cancel`,
  36. method: 'DELETE',
  37. params: {
  38. id,
  39. },
  40. });
  41. },
  42. // 获得售后日志列表
  43. getAfterSaleLogList: (afterSaleId) => {
  44. return request({
  45. url: `/trade/after-sale-log/list`,
  46. method: 'GET',
  47. params: {
  48. afterSaleId,
  49. },
  50. });
  51. },
  52. // 退回货物
  53. deliveryAfterSale: (data) => {
  54. return request({
  55. url: `/trade/after-sale/delivery`,
  56. method: 'PUT',
  57. data,
  58. });
  59. }
  60. };
  61. export default AfterSaleApi;