activity.js 6.0 KB

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