spu.js 812 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import request from '@/sheep/request';
  2. const SpuApi = {
  3. // 获得商品 SPU 列表
  4. getSpuListByIds: (ids) => {
  5. return request({
  6. url: '/product/spu/list-by-ids',
  7. method: 'GET',
  8. params: { ids },
  9. custom: {
  10. showLoading: false,
  11. showError: false,
  12. },
  13. });
  14. },
  15. // 获得商品 SPU 分页
  16. getSpuPage: (params) => {
  17. return request({
  18. url: '/product/spu/page',
  19. method: 'GET',
  20. params,
  21. custom: {
  22. showLoading: false,
  23. showError: false,
  24. },
  25. });
  26. },
  27. // 查询商品
  28. getSpuDetail: (id) => {
  29. return request({
  30. url: '/product/spu/get-detail',
  31. method: 'GET',
  32. params: { id },
  33. custom: {
  34. showLoading: false,
  35. showError: false,
  36. },
  37. });
  38. }
  39. };
  40. export default SpuApi;