import request from '@/apps/mobile/utils/request'


// 卡券分页列表
export function queryCouponsList(data) {
    return request({
        method: 'post',
        url: '/api/coupons/query-page',
        data,
    });
}

// 新增卡券
export function addCoupons(data) {
    return request({
        method: 'post',
        url: '/api/coupons/insert',
        data,
    });
}


// 更新卡券
export function updateCouponsStatus(data) {
    return request({
        method: 'put',
        url: `/api/coupons/update`,
        data,
    });
}

// 卡券审核
export function couponsExamine(data) {
    return request({
        method: 'post',
        url: `/api/coupons/examine`,
        data,
    });
}

// 单个删除卡券
export function deleteCouponSingle(data) {
    return request({
        method: 'delete',
        url: `/api/coupons/delete`,
        data
    });
}


// 批量删除卡券
export function deleteCouponBatch(data) {
    return request({
        method: 'delete',
        url: `/api/coupons/delete-batch`,
        data
    });
}


// 批量启用卡券
export function openCouponBatch(data) {
    return request({
        method: 'post',
        url: '/api/coupons/useBath',
        data,
    });
}
