import request from '@/utils/request'

// 新增优惠券
export function addOrder(data) {
    return request({
        url: '/coupon/add',
        method: 'post',
        data: data
    })
} 

// 编辑优惠券
export function editOrder(data) {
    return request({
        url: '/coupon/id',
        method: 'put',
        data: data
    })
}

// 删除优惠券
export function deleteOrder(id) {
    return request({
        url: '/coupon/' + id,
        method: 'delete'
    })
}

// 获取所有优惠券
export function getList(parms) {
    return request({
        url: '/coupon/list',
        method: 'get',
        params: parms
    })
}