46 lines
932 B
JavaScript
46 lines
932 B
JavaScript
import request from '@/utils/request';
|
|
|
|
// 分页查询理论试题
|
|
export function listQuestionPage(params) {
|
|
return request({
|
|
url: `/api/questionBank/questions/paging`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
// 创建题目
|
|
export function createQuestion(data) {
|
|
return request({
|
|
url: `/api/questionBank/questions`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
// 删除题目
|
|
export function deleteQuestion(questionId) {
|
|
return request({
|
|
url: `/api/questionBank/questions/${questionId}`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
// 更新题目
|
|
export function updateOption(data) {
|
|
return request({
|
|
url: `/api/questionBank/questions/${data.id}`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
// 获取题目信息
|
|
export function getQuestionInfo(questionId) {
|
|
return request({
|
|
url: `/api/questionBank/questions/${questionId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|