activity.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2024 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. export function getCombinationList(data) {
  16. return request.get('store/product/group/lst', data, {
  17. noAuth: true
  18. });
  19. }
  20. /**
  21. * 拼团参与人
  22. *
  23. */
  24. export function getCombinationUser(data) {
  25. return request.get('store/product/group/count', data, {
  26. noAuth: true
  27. });
  28. }
  29. /**
  30. * 活动分类
  31. *
  32. */
  33. export function getActivitycategory(type) {
  34. return request.get('product/spu/active/category/' + type, {}, {
  35. noAuth: true
  36. });
  37. }
  38. /**
  39. * 拼团详情
  40. *
  41. */
  42. export function getCombinationDetail(id) {
  43. return request.get('store/product/group/detail/' + id, {}, {
  44. noAuth: true
  45. });
  46. }
  47. /**
  48. * 拼团 开团
  49. */
  50. export function getCombinationPink(id) {
  51. return request.get("store/product/group/get/" + id);
  52. }
  53. /**
  54. * 拼团 取消开团
  55. */
  56. export function postCombinationRemove(data) {
  57. return request.post("store/product/group/cancel", data);
  58. }
  59. /**
  60. * 秒杀产品详情
  61. * @param int id
  62. */
  63. export function getSeckillDetail(id) {
  64. return request.get('store/product/seckill/detail/' + id, {}, {
  65. noAuth: true
  66. });
  67. }
  68. /**
  69. * 拼团海报
  70. * @param object data
  71. *
  72. */
  73. export function getCombinationPoster(data) {
  74. return request.post('combination/poster', data)
  75. }
  76. /**
  77. * 获取秒杀小程序二维码
  78. */
  79. export function seckillCode(id, data) {
  80. return request.get("seckill/code/" + id, data);
  81. }
  82. /**
  83. * 获取拼团小程序二维码
  84. */
  85. export function scombinationCode(id) {
  86. return request.get("combination/code/" + id);
  87. }
  88. /**
  89. * 秒杀产品时间区间
  90. *
  91. */
  92. export function getSeckillIndexTime() {
  93. return request.get('store/product/seckill/select', {}, {
  94. noAuth: true
  95. });
  96. }
  97. /**
  98. * 秒杀产品列表
  99. * @param int time
  100. * @param object data
  101. */
  102. export function getSeckillList(data) {
  103. return request.get('store/product/seckill/lst', data, {
  104. noAuth: true
  105. });
  106. }
  107. /**
  108. * 预售列表
  109. */
  110. export function getPresellList(data) {
  111. return request.get('store/product/presell/lst', data, {
  112. noAuth: true
  113. });
  114. }
  115. /**
  116. * 助力列表
  117. */
  118. export function getAssistList(data) {
  119. return request.get('store/product/assist/lst', data, {
  120. noAuth: true
  121. });
  122. }
  123. /**
  124. * 助力列表 -- 发起助力
  125. */
  126. export function initiateAssistApi(id) {
  127. return request.post('store/product/assist/create/' + id);
  128. }
  129. /**
  130. * 助力详情
  131. */
  132. export function getAssistDetail(id,data) {
  133. return request.get('store/product/assist/detail/' + id,data);
  134. }
  135. /**
  136. * 助力好友
  137. */
  138. export function assistHelpList(id, data) {
  139. return request.get('store/product/assist/user/' + id, data);
  140. }
  141. /**
  142. * 预售协议
  143. */
  144. export function presellAgreement() {
  145. return request.get('store/product/presell/agree');
  146. }
  147. /**
  148. * 已助力成功数据
  149. */
  150. export function assistUserData(data) {
  151. return request.get('store/product/assist/count', data, {
  152. noAuth: true
  153. });
  154. }
  155. /**
  156. * 为好友助力
  157. */
  158. export function postAssistHelp(id) {
  159. return request.post('store/product/assist/set/' + id);
  160. }
  161. /**
  162. * 获取助力查看分享次数
  163. */
  164. export function getAssistUser(id) {
  165. return request.get('store/product/assist/share/' + id);
  166. }
  167. /**
  168. * 助力记录列表
  169. */
  170. export function getBargainUserList(data) {
  171. return request.get('store/product/assist/set/lst', data);
  172. }
  173. /**
  174. * 助力记录列表 -- 取消
  175. */
  176. export function getBargainUserCancel(id) {
  177. return request.post('store/product/assist/set/delete/' + id);
  178. }
  179. /**
  180. * 活动专题列表
  181. */
  182. export function getTopicList(id, data) {
  183. return request.get(`activity/lst/${id}`, data, {
  184. noAuth: true
  185. });
  186. }
  187. /**
  188. * 活动专题详情
  189. */
  190. export function getTopicDetail(id) {
  191. return request.get(`activity/info/${id}`,{}, {
  192. noAuth: true
  193. });
  194. }
  195. /**
  196. * 活动专题商品
  197. */
  198. export function getTopicProLst(data) {
  199. return request.get(`product/spu/labels`,data, {
  200. noAuth: true
  201. });
  202. }
  203. /**
  204. * 获取本地服务商户列表
  205. */
  206. export function getMerchantServiceLst(data) {
  207. return request.get(`store/merchant/local`,data, {
  208. noAuth: true
  209. });
  210. }
  211. /**
  212. * 获取优惠券列表
  213. */
  214. export function getCouponLst(data) {
  215. return request.get(`coupon/getlst`,data, {
  216. noAuth: true
  217. });
  218. }
  219. /**
  220. * 获取优惠券列表
  221. */
  222. export function getNewPeopleCouponLst(data) {
  223. return request.get(`coupon/new_people`,data, {
  224. noAuth: true
  225. });
  226. }
  227. /**
  228. * 获取热卖排行列表
  229. */
  230. export function hotRankingApi(data) {
  231. return request.get(`product/spu/get_hot_ranking`,data, {
  232. noAuth: true
  233. });
  234. }
  235. /**
  236. * 热卖排行列表分类
  237. */
  238. export function spuTop(data) {
  239. return request.get(`store/product/category/hotranking`, {}, {
  240. noAuth: true
  241. });
  242. }
  243. /**
  244. * 热卖排行列表
  245. */
  246. export function spuTopList(data) {
  247. return request.get(`product/spu/get_hot_ranking`, data, {
  248. noAuth: true
  249. });
  250. }