combination.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. "use strict";
  2. const sheep_request_index = require("../../request/index.js");
  3. const CombinationApi = {
  4. // 获得拼团活动列表
  5. getCombinationActivityList: (count) => {
  6. return sheep_request_index.request({
  7. url: "/promotion/combination-activity/list",
  8. method: "GET",
  9. params: { count }
  10. });
  11. },
  12. // 获得拼团活动分页
  13. getCombinationActivityPage: (params) => {
  14. return sheep_request_index.request({
  15. url: "/promotion/combination-activity/page",
  16. method: "GET",
  17. params
  18. });
  19. },
  20. // 获得拼团活动明细
  21. getCombinationActivity: (id) => {
  22. return sheep_request_index.request({
  23. url: "/promotion/combination-activity/get-detail",
  24. method: "GET",
  25. params: {
  26. id
  27. }
  28. });
  29. },
  30. // 获得最近 n 条拼团记录(团长发起的)
  31. getHeadCombinationRecordList: (activityId, status, count) => {
  32. return sheep_request_index.request({
  33. url: "/promotion/combination-record/get-head-list",
  34. method: "GET",
  35. params: {
  36. activityId,
  37. status,
  38. count
  39. }
  40. });
  41. },
  42. // 获得我的拼团记录分页
  43. getCombinationRecordPage: (params) => {
  44. return sheep_request_index.request({
  45. url: "/promotion/combination-record/page",
  46. method: "GET",
  47. params
  48. });
  49. },
  50. // 获得拼团记录明细
  51. getCombinationRecordDetail: (id) => {
  52. return sheep_request_index.request({
  53. url: "/promotion/combination-record/get-detail",
  54. method: "GET",
  55. params: {
  56. id
  57. }
  58. });
  59. },
  60. // 获得拼团记录的概要信息
  61. getCombinationRecordSummary: () => {
  62. return sheep_request_index.request({
  63. url: "/promotion/combination-record/get-summary",
  64. method: "GET"
  65. });
  66. }
  67. };
  68. exports.CombinationApi = CombinationApi;