history.js 863 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import request from '@/sheep/request';
  2. const SpuHistoryApi = {
  3. // 删除商品浏览记录
  4. deleteBrowseHistory: (spuIds) => {
  5. return request({
  6. url: '/product/browse-history/delete',
  7. method: 'DELETE',
  8. data: { spuIds },
  9. custom: {
  10. showSuccess: true,
  11. successMsg: '删除成功',
  12. },
  13. });
  14. },
  15. // 清空商品浏览记录
  16. cleanBrowseHistory: () => {
  17. return request({
  18. url: '/product/browse-history/clean',
  19. method: 'DELETE',
  20. custom: {
  21. showSuccess: true,
  22. successMsg: '清空成功',
  23. },
  24. });
  25. },
  26. // 获得商品浏览记录分页
  27. getBrowseHistoryPage: (data) => {
  28. return request({
  29. url: '/product/browse-history/page',
  30. method: 'GET',
  31. data,
  32. custom: {
  33. showLoading: false
  34. },
  35. });
  36. },
  37. };
  38. export default SpuHistoryApi;