|
|
@@ -1,89 +1,70 @@
|
|
|
import { delete0, get, post } from '@/utils/request'
|
|
|
|
|
|
const examApi = {
|
|
|
- getExamSubject: '/api/content/exam/subject',
|
|
|
- getExamSubjectKV: '/api/content/exam/subject/kv',
|
|
|
- getExamQuestion: '/api/content/exam/question',
|
|
|
- getExamQuestion1: '/api/content/exam/question/1',
|
|
|
- getExamQuestionType: '/api/content/exam/question/type',
|
|
|
- postExamQuestion: '/api/content/exam/question',
|
|
|
- postExamPaper: '/api/content/exam/paper/submit1',
|
|
|
- getExamPapers: '/api/content/exam/start',
|
|
|
- getExamResult: '/api/content/exam/result',
|
|
|
- getExamPaperScore: '/api/content/exam/paper/score',
|
|
|
- getExam: '/api/content/exam',
|
|
|
+ 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',
|
|
|
- postPaper: '/api/content/exam/paper'
|
|
|
+ addPaper: '/api/content/exam/paper',
|
|
|
+ startExam: '/api/content/exam/start',
|
|
|
+ submitExam: '/api/content/exam/submit',
|
|
|
+ getExamResult: '/api/content/exam/result'
|
|
|
}
|
|
|
|
|
|
-export function getExamSubject() {
|
|
|
- return get(examApi.getExamSubject)
|
|
|
+export function getSubject() {
|
|
|
+ return get(examApi.getSubject)
|
|
|
}
|
|
|
|
|
|
-export function getExamSubjectKV() {
|
|
|
- return get(examApi.getExamSubjectKV)
|
|
|
+export function getSubjectKV() {
|
|
|
+ return get(examApi.getSubjectKV)
|
|
|
}
|
|
|
|
|
|
-export function getExamQuestionType() {
|
|
|
- return get(examApi.getExamQuestionType)
|
|
|
+export function getQuestionType() {
|
|
|
+ return get(examApi.getQuestionType)
|
|
|
}
|
|
|
|
|
|
-export function getExamQuestionPage(param) {
|
|
|
- return get(examApi.getExamQuestion1, param)
|
|
|
+export function getQuestions(param) {
|
|
|
+ return get(examApi.getQuestion, param)
|
|
|
}
|
|
|
|
|
|
-export function deleteExamQuestion(questionId) {
|
|
|
- return delete0(examApi.getExamQuestion + '/' + questionId)
|
|
|
+export function deleteQuestion(questionId) {
|
|
|
+ return delete0(examApi.getQuestion + '/' + questionId)
|
|
|
}
|
|
|
|
|
|
-export function getExamQuestion1(questionId) {
|
|
|
- return get(examApi.getExamQuestion1 + '/' + questionId)
|
|
|
+export function getQuestion(questionId) {
|
|
|
+ return get(examApi.getQuestion + '/' + questionId)
|
|
|
}
|
|
|
|
|
|
-export function postExamQuestion(data) {
|
|
|
- return post(examApi.postExamQuestion, data)
|
|
|
+export function addQuestion(data) {
|
|
|
+ return post(examApi.addQuestion, data)
|
|
|
}
|
|
|
|
|
|
-export function getExams(pageNumber) {
|
|
|
- return get(examApi.getExam)
|
|
|
+export function getPapers(param) {
|
|
|
+ return get(examApi.getPaper, param)
|
|
|
}
|
|
|
|
|
|
-export function getExam(paperId) {
|
|
|
- return get(examApi.getExam + '/' + paperId)
|
|
|
+export function getPaper(examId) {
|
|
|
+ return get(examApi.getPaper + '/' + examId)
|
|
|
}
|
|
|
|
|
|
-export function getExamInfoById(paperId) {
|
|
|
- return get(examApi.getExamPapers + '/' + paperId)
|
|
|
+export function addPaper(data) {
|
|
|
+ return post(examApi.addPaper, data)
|
|
|
}
|
|
|
|
|
|
-export function getQuestionByIds(data) {
|
|
|
- return get(examApi.getExamQuestion, data)
|
|
|
+export function getExamInfo(paperId) {
|
|
|
+ return get(examApi.startExam + '/' + paperId)
|
|
|
}
|
|
|
|
|
|
-export function getQuestionByPaperId(paperId) {
|
|
|
- return get('/api/content/exam/paperquestion' + '/' + paperId)
|
|
|
+export function getPaperQuestions(paperId) {
|
|
|
+ return get('/api/content/exam/paper/' + paperId + '/question')
|
|
|
}
|
|
|
|
|
|
-export function submitExamPaper(data) {
|
|
|
- return post(examApi.postExamPaper, data)
|
|
|
+export function submitExam(data) {
|
|
|
+ return post(examApi.submitExam, data)
|
|
|
}
|
|
|
|
|
|
export function getExamResult(examId) {
|
|
|
return get(examApi.getExamResult + '/' + examId)
|
|
|
}
|
|
|
-
|
|
|
-export function getExamPaperScore(examId) {
|
|
|
- return get(examApi.getExamPaperScore + '/' + examId)
|
|
|
-}
|
|
|
-
|
|
|
-export function postPaper(data) {
|
|
|
- return post(examApi.postPaper, data)
|
|
|
-}
|
|
|
-
|
|
|
-export function getPapers(param) {
|
|
|
- return get(examApi.getPaper, param)
|
|
|
-}
|
|
|
-
|
|
|
-export function getPaper(examId) {
|
|
|
- return get(examApi.getPaper + '/' + examId)
|
|
|
-}
|