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

export function getList(data) {
    return request({
        url: `${urlType}/admin/discountActivity/page`,
        method: "GET",
        data: {
            ...data
        }
    })
}
export function add(data) {
    return request({
        url: `${urlType}/admin/discountActivity`,
        method: "POST",
        data: {
            ...data
        }
    })
}

export function update(data) {
    return request({
        url: `${urlType}/admin/discountActivity`,
        method: "PUT",
        data: {
            ...data
        }
    })
}

export function del(id) {
    return request({
        url: `${urlType}/admin/discountActivity?id=`+id,
        method: "DELETE",
    })
}

/**
 * 满减活动
 * @returns
 */
export function discountActivity(params) {
    return request({
        url: urlType+`/admin/discountActivity`,
        method: 'get',
        params: {
            ...params
        }
    })
}


