import request from '@/utils/request'

const examApi = {
    examList: 'exam/list', // 我的考试-预约考试列表
    attendList: 'exam/attend', // 我的考试-已参加考试
    exam: 'exam/exam', // 我的考试进入考试
    viewReport: 'exam/viewReport', // 查看报告
    viewResolution: 'exam/viewResolution', // 查看解析
    submit: 'exam/submit', // 交卷
    subscribe: '/exam/subscribe'
}

export function reqExamViewResolution (data) {
    return request({
        url: examApi.viewResolution,
        method: 'get',
        params: data
    })
}

export function reqExamSubscribe (data) {
    return request({
        url: examApi.subscribe,
        method: 'get',
        params: data
    })
}

export function reqExamSubmit (data) {
    return request({
        url: examApi.submit,
        method: 'post',
        data: data
    })
}

export function reqExamList (params) {
    return request({
        url: examApi.examList,
        method: 'get',
        params: params
    })
}

export function reqExamAttendList (params) {
    return request({
        url: examApi.attendList,
        method: 'get',
        params: params
    })
}

export function reqExamExam (params) {
    return request({
        url: examApi.exam,
        method: 'get',
        params: params
    })
}

export function reqExamViewReport (params) {
    return request({
        url: examApi.viewReport,
        method: 'get',
        params: params
    })
}
