import http from '@/http/http.js'
const request = http.request
const urlType='market/admin/coupon'

export function getRecordByUser(params) {
    return request({
        url: `${urlType}/getRecordByUser`,
        method: "GET",
        params: {
            ...params
        }
    })
}

export function deleteRecord(params) {
    return request({
        url: `${urlType}/deleteRecord?id=`+params.id,
        method: "DELETE",
    })
}

export function getList(params) {
    return request({
        url: `${urlType}/page`,
        method: "GET",
        params: {
            ...params
        }
    })
}
export function giveCoupon(data) {
    return request({
        url: `${urlType}/grant`,
        method: "POST",
		data
    })
}