import request from '@/utils/request'

// 新增活动
export function addWork(data) {
    return request({
        url: '/activi/add',
        method: 'post',
        data: data
    })
} 

// 编辑活动
export function editWork(data) {
    return request({
        url: '/activi/id',
        method: 'put',
        data: data
    })
}

// 查看活动
export function lookWork(parms) {
    return request({
        url: '/activi/id',
        method: 'get',
        params:parms
    })
}

// 删除活动
export function deleteWork(parms) {
    return request({
        url: '/activi/id',
        method: 'delete',
        params: parms
    })
}


//获取所有商户信息
export function partList(parms) {
    return request({
        url: '/part/list',
        method: 'get',
        params: parms
    })
}

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

// 获取所有活动
export function getList(parms) {
    return request({
        url: '/activi/list',
        method: 'get',
        params: parms
    })
}