activity.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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,{noAuth:true});
  13. }
  14. /**
  15. * 拼团详情
  16. *
  17. */
  18. export function getCombinationDetail(id) {
  19. return request.get('combination/detail/'+id);
  20. }
  21. /**
  22. * 拼团 开团
  23. */
  24. export function getCombinationPink(id) {
  25. return request.get("combination/pink/" + id);
  26. }
  27. /**
  28. * 拼团 取消开团
  29. */
  30. export function postCombinationRemove(data) {
  31. return request.post("combination/remove",data);
  32. }
  33. /**
  34. * 砍价列表
  35. */
  36. export function getBargainList(data) {
  37. return request.get("bargain/list", data,{noAuth:true});
  38. }
  39. /**
  40. *
  41. * 砍价列表(已参与)
  42. * @param object data
  43. */
  44. export function getBargainUserList(data){
  45. return request.get('bargain/user/list',data);
  46. }
  47. /**
  48. *
  49. * 取消砍价
  50. * @param int bargainId
  51. */
  52. export function bargainUserCancel(bargainId){
  53. return request.post('bargain/user/cancel', { bargainId: bargainId})
  54. }
  55. /**
  56. * 砍价产品详情
  57. */
  58. export function getBargainDetail(id) {
  59. return request.get("bargain/detail/" + id);
  60. }
  61. /**
  62. * 砍价 开启砍价用户信息
  63. */
  64. export function postBargainStartUser(data) {
  65. return request.post("bargain/start/user", data);
  66. }
  67. /**
  68. * 砍价开启
  69. */
  70. export function postBargainStart(bargainId) {
  71. return request.post("bargain/start", { bargainId: bargainId});
  72. }
  73. /**
  74. * 砍价 帮助好友砍价
  75. */
  76. export function postBargainHelp(data) {
  77. return request.post("bargain/help", data);
  78. }
  79. /**
  80. * 砍价 砍掉金额
  81. */
  82. export function postBargainHelpPrice(data) {
  83. return request.post("bargain/help/price", data);
  84. }
  85. /**
  86. * 砍价 砍价帮
  87. */
  88. export function postBargainHelpList(data) {
  89. return request.post("bargain/help/list", data);
  90. }
  91. /**
  92. * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
  93. */
  94. export function postBargainHelpCount(data) {
  95. return request.post("bargain/help/count", data);
  96. }
  97. /**
  98. * 砍价 观看/分享/参与次数
  99. */
  100. export function postBargainShare(bargainId) {
  101. return request.post("bargain/share", { bargainId: bargainId});
  102. }
  103. /**
  104. * 秒杀产品时间区间
  105. *
  106. */
  107. export function getSeckillIndexTime(){
  108. return request.get('seckill/index',{},{noAuth:true});
  109. }
  110. /**
  111. * 秒杀产品列表
  112. * @param int time
  113. * @param object data
  114. */
  115. export function getSeckillList(time,data){
  116. return request.get('seckill/list/'+time,data,{noAuth:true});
  117. }
  118. /**
  119. * 秒杀产品详情
  120. * @param int id
  121. */
  122. export function getSeckillDetail(id){
  123. return request.get('seckill/detail/'+id);
  124. }
  125. /**
  126. * 砍价海报
  127. * @param object data
  128. *
  129. */
  130. export function getBargainPoster(data){
  131. return request.post('bargain/poster',data)
  132. }
  133. /**
  134. * 拼团海报
  135. * @param object data
  136. *
  137. */
  138. export function getCombinationPoster(data){
  139. return request.post('combination/poster',data)
  140. }