history.js 953 B

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