mall-uniapp/api/activity.js

144 lines
2.5 KiB
JavaScript
Raw Normal View History

2020-08-13 08:12:57 +00:00
import request from "@/utils/request.js";
/**
2023-06-17 16:36:22 +00:00
*
2020-08-13 08:12:57 +00:00
* 所有活动接口 包括拼团砍价秒杀
2023-06-17 16:36:22 +00:00
*
2020-08-13 08:12:57 +00:00
*/
/**
* 拼团列表
2023-06-17 16:36:22 +00:00
*
2020-08-13 08:12:57 +00:00
*/
export function getCombinationList(data) {
return request.get('combination/list', data,{noAuth:true});
}
/**
* 拼团 开团
*/
export function getCombinationPink(id) {
return request.get("combination/pink/" + id);
}
/**
* 拼团 取消开团
*/
export function postCombinationRemove(data) {
return request.post("combination/remove",data);
}
/**
* 砍价列表
*/
export function getBargainList(data) {
return request.get("bargain/list", data,{noAuth:true});
}
/**
2023-06-17 16:36:22 +00:00
*
2020-08-13 08:12:57 +00:00
* 砍价列表(已参与)
* @param object data
*/
export function getBargainUserList(data){
return request.get('bargain/record',data);
2020-08-13 08:12:57 +00:00
}
/**
2023-06-17 16:36:22 +00:00
*
2020-08-13 08:12:57 +00:00
* 取消砍价
* @param int bargainId
*/
export function bargainUserCancel(bargainId){
return request.post('bargain/user/cancel', { bargainId: bargainId})
}
/**
* 砍价产品详情
*/
export function getBargainDetail(id) {
return request.get("bargain/detail/" + id);
}
/**
* 用户砍价信息,注意自己的活动和别人的活动的区别
2020-08-13 08:12:57 +00:00
*/
export function getBargainUser(data) {
return request.get("bargain/user", data);
2020-08-13 08:12:57 +00:00
}
2020-08-13 08:12:57 +00:00
/**
* 砍价开启
*/
export function postBargainStart(bargainId) {
return request.post("bargain/start", { bargainId: bargainId});
}
/**
* 砍价 帮助好友砍价
*/
export function postBargainHelp(data) {
return request.post("bargain/help", data);
}
/**
* 砍价 砍掉金额
*/
export function postBargainHelpPrice(data) {
return request.post("bargain/help/price", data);
}
/**
2023-06-17 16:36:22 +00:00
* 砍价 砍价帮
2020-08-13 08:12:57 +00:00
*/
export function postBargainHelpList(params,data) {
return request.get("bargain/help/list?limit="+params.limit+"&page="+params.page, data,{});
2020-08-13 08:12:57 +00:00
}
/**
* 砍价海报
* @param object data
2023-06-17 16:36:22 +00:00
*
2020-08-13 08:12:57 +00:00
*/
export function getBargainPoster(data){
return request.post('bargain/poster',data)
}
/**
* 拼团海报
* @param object data
2023-06-17 16:36:22 +00:00
*
2020-08-13 08:12:57 +00:00
*/
export function getCombinationPoster(data){
return request.post('combination/poster',data)
}
/**
* 砍价取消
*/
export function getBargainUserCancel(data) {
return request.post("/bargain/user/cancel", data);
}
/**
* 获取秒杀小程序二维码
*/
export function seckillCode(id,data) {
return request.get("seckill/code/"+id,data);
}
/**
* 获取拼团小程序二维码
*/
export function scombinationCode(id) {
return request.get("combination/code/"+id);
}
/**
* 首页砍价产品列表
*/
export function bargainHeaderApi(){
return request.get('bargain/header');
}