import request from '@/utils/request'

//优惠券基本信息/adminapi/marketing.coupon/info
export function getBaseCoupon(params: any) {
    return request.get({ url: '/marketing.coupon/info', params })
}
//领取记录
export function getCouponlists(params: any) {
    return request.get({ url: '/marketing.coupon_lists/lists', params })
}
//作废
export function setCouponlists(params: any) {
    return request.post({ url: '/marketing.coupon_lists/void', params })
}
//优惠券详情/adminapi/marketing.coupon/detail
export function getCoupondetail(params: any) {
    return request.get({ url: '/marketing.coupon/detail', params })
}
//添加优惠券
export function addCoupon(params: any) {
    return request.post({ url: '/coupon/add', params })
}
//优惠券列表
export function GetcouponLists(params?: any) {
    return request.get({ url: '/coupon/list', params })
}
//删除优惠券
export function delCoupon(params: any) {
    return request.post({ url: '/coupon/del', params })
}
//切换发放状态
export function switchCouponStatus(params: any) {
    return request.post({ url: '/channelCoupon/edit', params })
}
// 优惠券指定分销员
export function getCouponListsByChannel(params: any) {
    return request.get({ url: '/channelCoupon/list', params })
}
// 用户领取优惠券
export function getCouponByUser(params: any) {
    return request.get({ url: '/userCoupon/queryUserGetRecord', params })
}
// 删除指定分销员优惠券
export function delCouponByDistributor(params: any) {
    return request.post({ url: '/channelCoupon/del', params })
}
// 优惠券详情
export function getCouponDetailApi(params: any) {
    return request.get({ url: '/coupon/detail', params })
}
// 优惠券发放状态
export function CouponStatusApi(params: any) {
    return request.post({ url: '/coupon/setCouponStatus', params })
}

//开始领取/adminapi/marketing.coupon/open
export function startCoupon(params: any) {
    return request.post({ url: '/marketing.coupon/open', params })
}
export function overCoupon(params: any) {
    return request.post({ url: '/marketing.coupon/stop', params })
}
//系统发放优惠券
export function sendCoupon(params: any) {
    return request.post({ url: '/marketing.coupon/send', params })
}
//抢购列表/adminapi/marketing.seckill/lists
export function getSeckillLists(params: any) {
    return request.get({ url: '/marketing.seckill/lists', params })
}
