spu.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. "use strict";
  2. const sheep_request_index = require("../../request/index.js");
  3. const SpuApi = {
  4. // 获得商品 SPU 列表
  5. getSpuListByIds: (ids) => {
  6. return sheep_request_index.request({
  7. url: "/product/spu/list-by-ids",
  8. method: "GET",
  9. params: { ids },
  10. custom: {
  11. showLoading: false,
  12. showError: false
  13. }
  14. });
  15. },
  16. // 获得商品 SPU 分页
  17. getSpuPage: (params) => {
  18. return sheep_request_index.request({
  19. url: "/product/spu/page",
  20. method: "GET",
  21. params,
  22. custom: {
  23. showLoading: false,
  24. showError: false
  25. }
  26. });
  27. },
  28. // 查询商品
  29. getSpuDetail: (id) => {
  30. return sheep_request_index.request({
  31. url: "/product/spu/get-detail",
  32. method: "GET",
  33. params: { id },
  34. custom: {
  35. showLoading: false,
  36. showError: false
  37. }
  38. });
  39. }
  40. };
  41. const __vite_glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  42. __proto__: null,
  43. default: SpuApi
  44. }, Symbol.toStringTag, { value: "Module" }));
  45. exports.SpuApi = SpuApi;
  46. exports.__vite_glob_0_21 = __vite_glob_0_21;