77 lines
1.3 KiB
JavaScript
77 lines
1.3 KiB
JavaScript
import request from '@/utils/request';
|
|
|
|
/** 获取用户试题列表*/
|
|
export function generateExamList(examId) {
|
|
return request({
|
|
url: `/api/userExam/${examId}/generate`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 刷新考题列表*/
|
|
export function refreshExamList(userExamId) {
|
|
return request({
|
|
url: `/api/userExam/${userExamId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 提交一个考题*/
|
|
export function finishOneExamQuestion(data) {
|
|
return request({
|
|
url: '/api/userExam/finish',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/** 考试完成提交*/
|
|
export function submitExam(examId) {
|
|
return request({
|
|
url: `/api/userExam/${examId}/submit`,
|
|
method: 'put'
|
|
});
|
|
|
|
}
|
|
|
|
/** 获取用户考试列表*/
|
|
export function getPublishExam(data) {
|
|
return request({
|
|
url: `/api/userExam/list`,
|
|
method: 'get',
|
|
params: data
|
|
});
|
|
}
|
|
|
|
/** 删除用户考试*/
|
|
export function delPublishExam(id) {
|
|
return request({
|
|
url: `/api/userExam/${id}`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 删除用户实训*/
|
|
export function delTrainingList() {
|
|
return request({
|
|
url: `/api/userExam/list`,
|
|
method: 'delet'
|
|
});
|
|
}
|
|
|
|
/** 设置试卷失效 */
|
|
export function setExamGive(id) {
|
|
return request({
|
|
url: `/api/userExam/${id}/abandon`,
|
|
method: 'put'
|
|
});
|
|
}
|
|
|
|
export function updateExam(data) {
|
|
return request({
|
|
url: `/api/userExam/${data.id}`,
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
}
|