import request from '@/utils/request'

const questionApi = {
    add: 'courseManagement/question/addOrUpdate',
    get: '/courseManagement/question/details',
    //   update: 'sys/menu/update',
    del: 'courseManagement/question/delete',
    //   updateStatus: 'sys/menu/updateStatus',
    //   list: '/courseManagement/course/listPage',
    //   coursewareList:'/courseManagement/course/courseware/details',
    //   questionList:'/courseManagement/course/questionList',
    importTemplate: "courseManagement/question/importTemplate",
    getQuestionNumByCourseIds: '/courseManagement/question/getQuestionNumByCourseIds',
}


// 题目新增
export function questionAdd(params) {
    return request({
        url: questionApi.add,
        method: 'post',
        data: params
    })
}

// 题目数量
export function getQuestionNumByCourseIds(params) {
    return request({
        url: questionApi.getQuestionNumByCourseIds,
        method: 'post',
        data: params
    })
}
// export function menuGet (params) {
//   return request({
//     url: menuApi.get,
//     method: 'post',
//     data: params
//   })
// }
// export function menuUpdate (params) {
//   return request({
//     url: menuApi.update,
//     method: 'post',
//     data: params
//   })
// }


export function deleteQuestion(params) {
    return request({
        url: questionApi.del,
        method: 'delete',
        params: params
    })
}

// 查看课程详情
export function getQuestionDeatil(params) {
    return request({
        url: questionApi.get,
        method: 'get',
        params: params
    })
}

// 题目批量导入
export function importTemplate(params) {
    return request({
        url: questionApi.importTemplate,
        method: 'post',
        params: params
    })
}