activity.js 4.8 KB

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