activity.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. import request from "@/utils/request.js";
  2. /**
  3. * 拼团列表
  4. *
  5. */
  6. export function getCombinationList(data) {
  7. return request.get('store/product/group/lst', data, {
  8. noAuth: true
  9. });
  10. }
  11. /**
  12. * 拼团参与人
  13. *
  14. */
  15. export function getCombinationUser(data) {
  16. return request.get('store/product/group/count', data, {
  17. noAuth: true
  18. });
  19. }
  20. /**
  21. * 活动分类
  22. *
  23. */
  24. export function getActivitycategory(type) {
  25. return request.get('product/spu/active/category/' + type, {}, {
  26. noAuth: true
  27. });
  28. }
  29. /**
  30. * 拼团详情
  31. *
  32. */
  33. export function getCombinationDetail(id) {
  34. return request.get('store/product/group/detail/' + id, {}, {
  35. noAuth: true
  36. });
  37. }
  38. /**
  39. * 拼团 开团
  40. */
  41. export function getCombinationPink(id) {
  42. return request.get("store/product/group/get/" + id);
  43. }
  44. /**
  45. * 拼团 取消开团
  46. */
  47. export function postCombinationRemove(data) {
  48. return request.post("store/product/group/cancel", data);
  49. }
  50. /**
  51. * 秒杀产品详情
  52. * @param int id
  53. */
  54. export function getSeckillDetail(id) {
  55. return request.get('store/product/seckill/detail/' + id, {}, {
  56. noAuth: true
  57. });
  58. }
  59. /**
  60. * 拼团海报
  61. * @param object data
  62. *
  63. */
  64. export function getCombinationPoster(data) {
  65. return request.post('combination/poster', data)
  66. }
  67. /**
  68. * 获取秒杀小程序二维码
  69. */
  70. export function seckillCode(id, data) {
  71. return request.get("seckill/code/" + id, data);
  72. }
  73. /**
  74. * 获取拼团小程序二维码
  75. */
  76. export function scombinationCode(id) {
  77. return request.get("combination/code/" + id);
  78. }
  79. /**
  80. * 秒杀产品时间区间
  81. *
  82. */
  83. export function getSeckillIndexTime() {
  84. return request.get('store/product/seckill/select', {}, {
  85. noAuth: true
  86. });
  87. }
  88. /**
  89. * 秒杀产品列表
  90. * @param int time
  91. * @param object data
  92. */
  93. export function getSeckillList(data) {
  94. return request.get('store/product/seckill/lst', data, {
  95. noAuth: true
  96. });
  97. }
  98. /**
  99. * 预售列表
  100. */
  101. export function getPresellList(data) {
  102. return request.get('store/product/presell/lst', data, {
  103. noAuth: true
  104. });
  105. }
  106. /**
  107. * 助力列表
  108. */
  109. export function getAssistList(data) {
  110. return request.get('store/product/assist/lst', data, {
  111. noAuth: true
  112. });
  113. }
  114. /**
  115. * 助力列表 -- 发起助力
  116. */
  117. export function initiateAssistApi(id) {
  118. return request.post('store/product/assist/create/' + id);
  119. }
  120. /**
  121. * 助力详情
  122. */
  123. export function getAssistDetail(id) {
  124. return request.get('store/product/assist/detail/' + id);
  125. }
  126. /**
  127. * 助力好友
  128. */
  129. export function assistHelpList(id, data) {
  130. return request.get('store/product/assist/user/' + id, data);
  131. }
  132. /**
  133. * 预售协议
  134. */
  135. export function presellAgreement() {
  136. return request.get('store/product/presell/agree');
  137. }
  138. /**
  139. * 已助力成功数据
  140. */
  141. export function assistUserData() {
  142. return request.get('store/product/assist/count', {}, {
  143. noAuth: true
  144. });
  145. }
  146. /**
  147. * 为好友助力
  148. */
  149. export function postAssistHelp(id) {
  150. return request.post('store/product/assist/set/' + id);
  151. }
  152. /**
  153. * 获取助力查看分享次数
  154. */
  155. export function getAssistUser(id) {
  156. return request.get('store/product/assist/share/' + id);
  157. }
  158. /**
  159. * 助力记录列表
  160. */
  161. export function getBargainUserList(data) {
  162. return request.get('store/product/assist/set/lst', data);
  163. }
  164. /**
  165. * 助力记录列表 -- 取消
  166. */
  167. export function getBargainUserCancel(id) {
  168. return request.post('store/product/assist/set/delete/' + id);
  169. }