import request from '@/apps/mobile/utils/request'

// 题库 分页获取
export function queryPage(data) {
    return request({
        method: 'post',
        url: '/api/questionBanks/query-page',
        data,
    });
}

// 新增
export function addData(data) {
    return request({
        method: 'post',
        url: '/api/questionBanks/insert',
        data,
    });
}

// 删除
export function removeData(data) {
    return request({
        method: 'delete',
        url: '/api/questionBanks/delete-batch',
        data,
    });
}

// 编辑
export function editData(data) {
    return request({
        method: 'put',
        url: '/api/questionBanks/update',
        data,
    });
}

// 置顶
export function toUp(id) {
    return request({
        method: 'post',
        url: `/api/questionBanks/toUp/${id}`,
    });
}

// 批量上架
export function useBath(data) {
    return request({
        method: 'post',
        url: `/api/questionBanks/useBath`,
        data
    });
}

// 批量下架
export function noUseBath(data) {
    return request({
        method: 'post',
        url: `/api/questionBanks/noUseBath`,
        data
    });
}

// 审批
export function examine(data) {
    return request({
        method: 'post',
        url: `/api/questionBanks/examine`,
        data
    });
}

// // 审批驳回
// export function rejectApprove(data) {
//     return request({
//         method: 'post',
//         url: `/api/questionBanks/notExamine`,
//         data
//     });
// }