import request from '@/utils/request'

// 查询文创产品列表
export function listCultural(query) {
    return request({
        url: '/vrone/backend/culturals/list',
        method: 'get',
        params: query
    })
}

// 查询文创产品详细
export function getCultural(id) {
    return request({
        url: '/vrone/backend/culturals/' + id,
        method: 'get'
    })
}

// 导出文创产品
export function exportCultural(data) {
    return request({
        responseType: 'blob',
        url: '/vrone/backend/culturals/exportQrCodes',
        method: 'post',
        data: data
    })
}

// 新增文创产品
export function addCultural(data) {
    return request({
        url: '/vrone/backend/culturals',
        method: 'post',
        data: data
    })
}

// 修改文创产品
export function updateCultural(data) {
    return request({
        url: '/vrone/backend/culturals',
        method: 'put',
        data: data
    })
}

// 删除文创产品
export function delCultural(id) {
    return request({
        url: '/vrone/backend/culturals/' + id,
        method: 'delete'
    })
}
