import request from '@/utils/request'

const mycourseApi = {
    mycourseList: 'myCourse/getMyCourseList', // 我的课程列表，课程搜索
    addMyCourse: 'myCourse/addMyCourse', // 添加课程
    centerList: 'focused/training/list', // 集中培训列表
    centerDetail: 'focused/training/list', // 集中培训详情
    recommendList: 'sys/recommend/listPage', // 系统推荐课程列表
    recommendDetail: 'sys/recommend/detail', // 系统课程推荐详情
    getCourseDetail: 'myCourse/getCourseDetail', // 我的课程详情
    getCourseCatalogue: 'myCourse/getCourseCatalogue', // 获取课程目录
    reqCourseExam: 'testInClass/add', // 课中检测
    simulateTestList: 'simulateTest/list', // 模拟测试列表
    simulateTestDetail: 'simulateTest/getQuestions', // 获取模拟测试详情
    operationList: 'classwork/list', // 作业列表
    reqOperationDetail: 'classwork/get', // 作业详情
    reqOperationSubmit: 'classwork/submit', // 作业提交
    getMyCourseList: 'studyStatistics/getMyCourseList' // 课程学习统计
}

export function reqMycourseCount (params) {
    return request({
        url: mycourseApi.getMyCourseList,
        method: 'get',
        params: params
    })
}

export function reqOperationDetail (params) {
    return request({
        url: mycourseApi.reqOperationDetail,
        method: 'get',
        params: params
    })
}

export function reqOperationSubmit (params) {
    return request({
        url: mycourseApi.reqOperationSubmit,
        method: 'post',
        data: params
    })
}

export function reqOperationList (params) {
    return request({
        url: mycourseApi.operationList,
        method: 'get',
        params: params
    })
}

export function reqSimulateTestDetail (params) {
    return request({
        url: mycourseApi.simulateTestDetail,
        method: 'post',
        params: params
    })
}

export function reqSimulateTestList (data) {
    return request({
        url: mycourseApi.simulateTestList,
        method: 'post',
        data: data,
        params: data
    })
}

export function reqMyCourseList (params) {
    return request({
        url: mycourseApi.mycourseList,
        method: 'get',
        params: params
    })
}

export function reqAddMyCourse (params) {
    return request({
        url: mycourseApi.addMyCourse,
        method: 'get',
        params: params
    })
}

export function reqCourseCenterList (params) {
    return request({
        url: mycourseApi.centerList,
        method: 'get',
        params: params
    })
}

export function reqCourseCenterDetail (params) {
    return request({
        url: mycourseApi.centerDetail,
        method: 'get',
        params: params
    })
}

export function reqRecommendList (params) {
    return request({
        url: mycourseApi.recommendList,
        method: 'get',
        params: params
    })
}

export function recommendDetail (params) {
    return request({
        url: mycourseApi.recommendDetail,
        method: 'get',
        params: params
    })
}

export function reqCourseDetail (params) {
    return request({
        url: mycourseApi.getCourseDetail,
        method: 'get',
        params: params
    })
}

export function reqCourseCatalogue (params) {
    return request({
        url: mycourseApi.getCourseCatalogue,
        method: 'get',
        params: params
    })
}

export function reqCourseExam (params, data) {
    return request({
        url: mycourseApi.reqCourseExam,
        method: 'post',
        params: params,
        data: data
    })
}
