import { delete0, get, post } from '@/utils/request' const examApi = { // ********************************************************************************************************************* // 科目接口 getSubject: '/api/content/exam/subject', getSubjectKV: '/api/content/exam/subject/kv', // ********************************************************************************************************************* // 试题接口 getQuestionType: '/api/content/exam/question/type', getQuestion: '/api/content/exam/question', addQuestion: '/api/content/exam/question', // ********************************************************************************************************************* // 试卷接口 getPaper: '/api/content/exam/paper', getPaperDetail: '/api/content/exam/paper/detail', getPaperKeyValue: '/api/content/exam/paper/kv', addPaper: '/api/content/exam/paper', // ********************************************************************************************************************* // 考试接口 examList: '/api/content/exam/eval/list', startExam: '/api/content/exam/eval/start', cacheUserAnswer: '/api/content/exam/eval/cache', submitExam: '/api/content/exam/eval/submit', // ********************************************************************************************************************* // 阅卷接口 getExamMarkList: '/api/content/exam/mark/list', getMarkView: '/api/content/exam/mark/view', submitExamMark: '/api/content/exam/mark/submit' } // ********************************************************************************************************************* // 科目接口 export function getSubject() { return get(examApi.getSubject) } export function getSubjectKV() { return get(examApi.getSubjectKV) } // ********************************************************************************************************************* // 试题接口 export function getQuestionType() { return get(examApi.getQuestionType) } export function getQuestions(param) { return get(examApi.getQuestion, param) } export function deleteQuestion(questionId) { return delete0(examApi.getQuestion + '/' + questionId) } export function getQuestion(questionId) { return get(examApi.getQuestion + '/' + questionId) } export function addQuestion(data) { return post(examApi.addQuestion, data) } // ********************************************************************************************************************* // 试卷接口 export function getPapers(param) { return get(examApi.getPaper, param) } export function getPaper(paperId, viewType, userId) { return get(examApi.getPaperDetail + '?paperId=' + paperId + '&viewType=' + viewType + '&userId=' + userId) } export function getPaperKeyValues() { return get(examApi.getPaperKeyValue) } export function addPaper(data) { return post(examApi.addPaper, data) } export function deletePaper(paperId) { return delete0(examApi.addPaper + '/' + paperId) } // ********************************************************************************************************************* // 考试接口 export function getExamList() { return get(examApi.examList) } export function getExamInfo(paperId) { return get(examApi.startExam + '/' + paperId) } export function getPaperQuestions(paperId) { return get('/api/content/exam/paper/' + paperId + '/question') } export function submitExam(data) { return post(examApi.submitExam, data) } export function cacheUserAnswer(data) { return post(examApi.cacheUserAnswer, data) } // ********************************************************************************************************************* // 阅卷接口 export function getMarkView(paperId, userId) { return get(examApi.getMarkView + '?paperId=' + paperId + '&userId=' + userId) } export function getExamMarkList(params) { return get(examApi.getExamMarkList, params) } export function submitExamMark(data) { return post(examApi.submitExamMark, data) } // ********************************************************************************************************************* // 考试结果接口 export function getResultView(paperId) { return get('/api/content/exam/result/view/' + paperId) }