activity.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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,{},{noAuth: true});
  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. noAuth: true
  84. });
  85. }
  86. /**
  87. * 砍价 开启砍价用户信息
  88. */
  89. export function postBargainStartUser(data) {
  90. return request.post("bargain/start/user", data);
  91. }
  92. /**
  93. * 砍价开启
  94. */
  95. export function postBargainStart(bargainId) {
  96. return request.post("bargain/start", {
  97. bargainId: bargainId
  98. });
  99. }
  100. /**
  101. * 砍价 帮助好友砍价
  102. */
  103. export function postBargainHelp(data) {
  104. return request.post("bargain/help", data);
  105. }
  106. /**
  107. * 砍价 砍掉金额
  108. */
  109. export function postBargainHelpPrice(data) {
  110. return request.post("bargain/help/price", data);
  111. }
  112. /**
  113. * 砍价 砍价帮
  114. */
  115. export function postBargainHelpList(data) {
  116. return request.post("bargain/help/list", data);
  117. }
  118. /**
  119. * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
  120. */
  121. export function postBargainHelpCount(data) {
  122. return request.post("bargain/help/count", data);
  123. }
  124. /**
  125. * 砍价 观看/分享/参与次数
  126. */
  127. export function postBargainShare(bargainId) {
  128. return request.post("bargain/share", {
  129. bargainId: bargainId
  130. });
  131. }
  132. /**
  133. * 秒杀产品时间区间
  134. *
  135. */
  136. export function getSeckillIndexTime() {
  137. return request.get('seckill/index', {}, {
  138. noAuth: true
  139. });
  140. }
  141. /**
  142. * 秒杀产品列表
  143. * @param int time
  144. * @param object data
  145. */
  146. export function getSeckillList(time, data) {
  147. return request.get('seckill/list/' + time, data, {
  148. noAuth: true
  149. });
  150. }
  151. /**
  152. * 秒杀产品详情
  153. * @param int id
  154. */
  155. export function getSeckillDetail(id, data) {
  156. return request.get('seckill/detail/' + id, data,{
  157. noAuth: true
  158. });
  159. }
  160. /**
  161. * 砍价海报
  162. * @param object data
  163. *
  164. */
  165. export function getBargainPoster(data) {
  166. return request.post('bargain/poster', data)
  167. }
  168. /**
  169. * 拼团海报
  170. * @param object data
  171. *
  172. */
  173. export function getCombinationPoster(data) {
  174. return request.post('combination/poster', data)
  175. }
  176. /**
  177. * 砍价取消
  178. */
  179. export function getBargainUserCancel(data) {
  180. return request.post("bargain/user/cancel", data);
  181. }
  182. /**
  183. * 获取秒杀小程序二维码
  184. */
  185. export function seckillCode(id, data) {
  186. return request.get("seckill/code/" + id, data);
  187. }
  188. /**
  189. * 获取拼团小程序二维码
  190. */
  191. export function scombinationCode(id) {
  192. return request.get("combination/code/" + id);
  193. }
  194. /**
  195. * 获取砍价海报详细信息
  196. */
  197. export function getCombinationPosterData(id) {
  198. return request.get("combination/poster_info/" + id);
  199. }
  200. /**
  201. * 获取砍价海报详细信息
  202. */
  203. export function getBargainPosterData(id) {
  204. return request.get("bargain/poster_info/" + id);
  205. }
  206. /**
  207. * 获取积分订单详细信息
  208. */
  209. export function integralOrderConfirm(data) {
  210. return request.post('store_integral/order/confirm', data);
  211. }
  212. /**
  213. * 获取积分订单创建
  214. */
  215. export function integralOrderCreate(data) {
  216. return request.post('store_integral/order/create', data);
  217. }
  218. /**
  219. * 获取积分订单详情
  220. * @param string cartId
  221. */
  222. export function integralOrderDetails(order) {
  223. return request.get(`store_integral/order/detail/${order}`);
  224. }
  225. /**
  226. * 积分产品详情
  227. * @param int id
  228. *
  229. */
  230. export function getIntegralProductDetail(id) {
  231. return request.get('store_integral/detail/' + id, {}, {
  232. noAuth: true
  233. });
  234. }
  235. /**
  236. * 积分商城商品列表
  237. * @param object data
  238. */
  239. export function getStoreIntegralList(data) {
  240. return request.get('store_integral/list', data, {
  241. noAuth: true
  242. });
  243. }
  244. /**
  245. * 积分兑换列表
  246. * @param object data
  247. */
  248. export function getIntegralOrderList(data) {
  249. return request.get('store_integral/order/list', data);
  250. }
  251. /**
  252. * 积分兑换详情
  253. */
  254. export function getLogisticsDetails(orderId) {
  255. return request.get(`store_integral/order/express/${orderId}`);
  256. }
  257. /**
  258. * 积分兑换订单确认收货
  259. * @param object data
  260. */
  261. export function orderTake(data) {
  262. return request.post(`store_integral/order/take`, data);
  263. }
  264. /**
  265. * 积分兑换订单删除
  266. * @param object data
  267. */
  268. export function orderDel(data) {
  269. return request.post(`store_integral/order/del`, data);
  270. }
  271. /**
  272. * 预售商品列表
  273. */
  274. export function getAdvancellList(data) {
  275. return request.get("presale/list", data);
  276. }
  277. /**
  278. * 限时折扣商品列表
  279. */
  280. export function promotionsList(type,data) {
  281. return request.get("v2/promotions/productList/"+type, data);
  282. }
  283. /**
  284. * 活动赠送商品
  285. */
  286. export function giveInfo(id) {
  287. return request.get("v2/promotions/give_info/"+id);
  288. }
  289. /**
  290. * 秒杀商品二维码
  291. * @param {Object} id
  292. */
  293. export function seckillQRCode(id) {
  294. return request.get(`seckill/code/${id}`);
  295. }
  296. /**
  297. * 获取拼团商品详情二维码
  298. * @param {Object} id
  299. */
  300. export function combinationQRCode(id) {
  301. return request.get(`combination/detail_code/${id}`);
  302. }