activity.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. import request from "@/utils/request.js";
  2. /**
  3. *
  4. * 所有活动接口 包括:拼团,砍价,秒杀
  5. *
  6. */
  7. /**
  8. * 拼团列表
  9. *
  10. */
  11. export function getCombinationList(data) {
  12. return request.get('combination/list', data, {
  13. noAuth: true
  14. });
  15. }
  16. /**
  17. * 拼团详情
  18. *
  19. */
  20. export function getCombinationDetail(id) {
  21. return request.get('combination/detail/' + id);
  22. }
  23. /**
  24. * 拼团 开团
  25. */
  26. export function getCombinationPink(id) {
  27. return request.get("combination/pink/" + id);
  28. }
  29. /**
  30. * 拼团 取消开团
  31. */
  32. export function postCombinationRemove(data) {
  33. return request.post("combination/remove", data);
  34. }
  35. /**
  36. * 砍价列表
  37. */
  38. export function getBargainList(data) {
  39. return request.get("bargain/list", data, {
  40. noAuth: true
  41. });
  42. }
  43. /**
  44. * 拼团轮播
  45. *
  46. */
  47. export function getCombinationBannerList(data) {
  48. return request.get('combination/banner_list', data, {
  49. noAuth: true
  50. });
  51. }
  52. /**
  53. * 拼团人数
  54. *
  55. */
  56. export function getPink(data) {
  57. return request.get('pink', data, {
  58. noAuth: true
  59. });
  60. }
  61. /**
  62. *
  63. * 砍价列表(已参与)
  64. * @param object data
  65. */
  66. export function getBargainUserList(data) {
  67. return request.get('bargain/user/list', data);
  68. }
  69. /**
  70. * 砍价产品详情
  71. */
  72. export function getBargainDetail(id, uid) {
  73. return request.get(`bargain/detail/${id}?bargainUid=${uid}`);
  74. }
  75. /**
  76. * 砍价 开启砍价用户信息
  77. */
  78. export function postBargainStartUser(data) {
  79. return request.post("bargain/start/user", data);
  80. }
  81. /**
  82. * 砍价开启
  83. */
  84. export function postBargainStart(bargainId) {
  85. return request.post("bargain/start", {
  86. bargainId: bargainId
  87. });
  88. }
  89. /**
  90. * 砍价 帮助好友砍价
  91. */
  92. export function postBargainHelp(data) {
  93. return request.post("bargain/help", data);
  94. }
  95. /**
  96. * 砍价 砍掉金额
  97. */
  98. export function postBargainHelpPrice(data) {
  99. return request.post("bargain/help/price", data);
  100. }
  101. /**
  102. * 砍价 砍价帮
  103. */
  104. export function postBargainHelpList(data) {
  105. return request.post("bargain/help/list", data);
  106. }
  107. /**
  108. * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
  109. */
  110. export function postBargainHelpCount(data) {
  111. return request.post("bargain/help/count", data);
  112. }
  113. /**
  114. * 砍价 观看/分享/参与次数
  115. */
  116. export function postBargainShare(bargainId) {
  117. return request.post("bargain/share", {
  118. bargainId: bargainId
  119. });
  120. }
  121. /**
  122. * 秒杀产品时间区间
  123. *
  124. */
  125. export function getSeckillIndexTime() {
  126. return request.get('seckill/index', {}, {
  127. noAuth: true
  128. });
  129. }
  130. /**
  131. * 秒杀产品列表
  132. * @param int time
  133. * @param object data
  134. */
  135. export function getSeckillList(time, data) {
  136. return request.get('seckill/list/' + time, data, {
  137. noAuth: true
  138. });
  139. }
  140. /**
  141. * 秒杀产品详情
  142. * @param int id
  143. */
  144. export function getSeckillDetail(id, data) {
  145. return request.get('seckill/detail/' + id, data);
  146. }
  147. /**
  148. * 砍价海报
  149. * @param object data
  150. *
  151. */
  152. export function getBargainPoster(data) {
  153. return request.post('bargain/poster', data)
  154. }
  155. /**
  156. * 拼团海报
  157. * @param object data
  158. *
  159. */
  160. export function getCombinationPoster(data) {
  161. return request.post('combination/poster', data)
  162. }
  163. /**
  164. * 砍价取消
  165. */
  166. export function getBargainUserCancel(data) {
  167. return request.post("bargain/user/cancel", data);
  168. }
  169. /**
  170. * 获取秒杀小程序二维码
  171. */
  172. export function seckillCode(id, data) {
  173. return request.get("seckill/code/" + id, data);
  174. }
  175. /**
  176. * 获取拼团小程序二维码
  177. */
  178. export function scombinationCode(id) {
  179. return request.get("combination/code/" + id);
  180. }
  181. /**
  182. * 获取砍价海报详细信息
  183. */
  184. export function getCombinationPosterData(id) {
  185. return request.get("combination/poster_info/" + id);
  186. }
  187. /**
  188. * 获取砍价海报详细信息
  189. */
  190. export function getBargainPosterData(id) {
  191. return request.get("bargain/poster_info/" + id);
  192. }
  193. /**
  194. * 获取积分订单详细信息
  195. */
  196. export function integralOrderConfirm(data) {
  197. return request.post('store_integral/order/confirm', data);
  198. }
  199. /**
  200. * 获取积分订单创建
  201. */
  202. export function integralOrderCreate(data) {
  203. return request.post('store_integral/order/create', data);
  204. }
  205. /**
  206. * 获取积分订单详情
  207. * @param string cartId
  208. */
  209. export function integralOrderDetails(order) {
  210. return request.get(`store_integral/order/detail/${order}`);
  211. }
  212. /**
  213. * 积分产品详情
  214. * @param int id
  215. *
  216. */
  217. export function getIntegralProductDetail(id) {
  218. return request.get('store_integral/detail/' + id, {}, {
  219. noAuth: true
  220. });
  221. }
  222. /**
  223. * 积分商城商品列表
  224. * @param object data
  225. */
  226. export function getStoreIntegralList(data) {
  227. return request.get('store_integral/list', data, );
  228. }
  229. /**
  230. * 积分兑换列表
  231. * @param object data
  232. */
  233. export function getIntegralOrderList(data) {
  234. return request.get('store_integral/order/list', data);
  235. }
  236. /**
  237. * 积分兑换详情
  238. */
  239. export function getLogisticsDetails(orderId) {
  240. return request.get(`store_integral/order/express/${orderId}`);
  241. }
  242. /**
  243. * 积分兑换订单确认收货
  244. * @param object data
  245. */
  246. export function orderTake(data) {
  247. return request.post(`store_integral/order/take`, data);
  248. }
  249. /**
  250. * 积分兑换订单删除
  251. * @param object data
  252. */
  253. export function orderDel(data) {
  254. return request.post(`store_integral/order/del`, data);
  255. }
  256. /**
  257. * 预售商品列表
  258. */
  259. export function getPresellList(data) {
  260. return request.get("advance/list", data);
  261. }