history.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. conversationList: (data) => {
  38. return request({
  39. url: '/promotion/kefu-conversation/listNew',
  40. method: 'GET',
  41. data,
  42. custom: {
  43. showLoading: false,
  44. },
  45. });
  46. },
  47. };
  48. export default SpuHistoryApi;