spu.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. // 获得产品结算信息
  16. getSettlementProduct: (spuIds) => {
  17. return request({
  18. url: '/trade/order/settlement-product',
  19. method: 'GET',
  20. params: { spuIds },
  21. custom: {
  22. showLoading: false,
  23. showError: false,
  24. },
  25. });
  26. },
  27. // 获得产品 SPU 分页
  28. getSpuPage: (params) => {
  29. return request({
  30. url: '/product/spu/page',
  31. method: 'GET',
  32. params,
  33. custom: {
  34. showLoading: false,
  35. showError: false,
  36. },
  37. });
  38. },
  39. // 查询产品
  40. getSpuDetail: (id) => {
  41. return request({
  42. url: '/product/spu/get-detail',
  43. method: 'GET',
  44. params: { id },
  45. custom: {
  46. showLoading: false,
  47. showError: false,
  48. },
  49. });
  50. },
  51. };
  52. export default SpuApi;