import request from '@/utils/request'

// 查询资讯分类列表
export function listCategory(query) {
    return request({
        url: '/manage/category/list',
        method: 'get',
        params: query
    })
}

// 查询资讯分类详细
export function getCategory(id) {
    return request({
        url: '/manage/category/' + id,
        method: 'get'
    })
}

// 新增资讯分类
export function addCategory(data) {
    return request({
        url: '/manage/category/add',
        method: 'post',
        data: data
    })
}

// 修改资讯分类
export function updateCategory(data) {
    return request({
        url: '/manage/category/edit',
        method: 'put',
        data: data
    })
}

// 删除资讯分类
export function delCategory(id) {
    return request({
        url: '/manage/category/' + id,
        method: 'delete'
    })
}
