import request from '@/utils/request'

// 查询学习培训订单主列表
export function listTrainingOrder(query) {
    return request({
        url: '/system/trainingOrder/list',
        method: 'get',
        params: query
    })
}
// 查看视频
export function orderItemDirectory(id) {
    return request({
        url: `/system/trainingOrder/orderItemDirectory?trainingOrderDetailsId=${id}`,
        method: 'get',
    
    })
}

// 查询学习培训订单主详细
export function getTrainingOrder(id) {
    return request({
        url: '/system/trainingOrder/' + id,
        method: 'get'
    })
}
// 确定按钮
export function xylWeChatRefundNotify(data) {
    return request({
        url: '/nurseApp/weChatPayment/weChatRefundOrderApply',
        method: 'post',
        data: data
    })
}
// 退款
export function refundInformation(id) {
    return request({
        url: `/system/trainingOrder/refundInformation` + `?id=${id}`,
        method: 'get',
    })
}


// 新增学习培训订单主
export function addTrainingOrder(data) {
    return request({
        url: '/system/trainingOrder/add',
        method: 'post',
        data: data
    })
}

// 修改学习培训订单主
export function updateTrainingOrder(data) {
    return request({
        url: '/system/trainingOrder/edit',
        method: 'post',
        data: data
    })
}

// 删除学习培训订单主
export function delTrainingOrder(id) {
    return request({
        url: '/system/trainingOrder/' + id,
        method: 'delete'
    })
}
