import request from '@/utils/request'

const coursewareApi = {
    add: '/courseManagement/xmCourseCourseware/addOrUpdate',
    get: '/courseManagement/xmCourseCourseware/details',
    del: 'courseManagement/xmCourseCourseware/delete',
    classList: '/courseManagement/coursewareClassify/listPage',
    resource:'/courseManagement/xmCourseCourseware/resource'
}



//删除课件
export function deleteCourseware(params) {
    return request({
        url: coursewareApi.del,
        method: 'delete',
        params: params
    })
}

// 课件新增
export function coursewareAdd(params) {
    return request({
        url: coursewareApi.add,
        method: 'post',
        data: params
    })
}

// 课件分类列表
export function coursewareClassList(params) {
    return request({
        url: coursewareApi.classList,
        method: 'get',
        params: params
    })
}


// 课件详情
export function coursewareDeatil(params) {
    return request({
        url: coursewareApi.get,
        method: 'get',
        params: params
    })
}


// 资源库
export function resource(params) {
    return request({
        url: coursewareApi.resource,
        method: 'get',
        params: params
    })
}