import request from '@/utils/request'

// 查询活动列表分页列表
export function pageActivity(query) {
    return request({
        url: '/vote/activity/page',
        method: 'get',
        params: query
    })
}

// 查询活动列表详细
export function getActivity(activityId) {
    return request({
        url: '/vote/activity/' + activityId,
        method: 'get'
    })
}

// 新增活动列表
export function addActivity(data) {
    return request({
        url: '/vote/activity',
        method: 'post',
        data: data
    })
}

// 修改活动列表
export function updateActivity(data) {
    return request({
        url: '/vote/activity',
        method: 'put',
        data: data
    })
}

// 逻辑删除活动列表
export function logicalDelActivity(activityId) {
    return request({
        url: '/vote/activity/abandon/' + activityId,
        method: 'put'
    })
}

// 删除活动列表
export function delActivity(activityId) {
    return request({
        url: '/vote/activity/' + activityId,
        method: 'delete'
    })
}
