rt-sim-training-client/src/api/questionsRule.js
2020-10-15 18:33:36 +08:00

48 lines
1.1 KiB
JavaScript

import request from '@/utils/request';
/** 获取出题规则列表 */
export function getQuestionRuleList() {
return request({
url: `/api/questionsRule`,
method: 'get'
});
}
/** 添加出题规则 */
export function addQuestionRule(data) {
return request({
url: `/api/questionsRule`,
method: 'post',
data
});
}
/** 分页获取规则列表 */
export function getQustionRuleListPage(params) {
return request({
url: `/api/questionsRule/paging`,
method: 'get',
params
});
}
/** 删除出题规则 */
export function deleteQuestionRule(id) {
return request({
url: `/api/questionsRule/${id}`,
method: 'delete'
});
}
/** 查询单个出题规则 */
export function selectedQuestionRule(id) {
return request({
url: `/api/questionsRule/${id}`,
method: 'get'
});
}
/** 更改出题规则内容 */
export function updateQuestionRule(id, data) {
return request({
url: `/api/questionsRule/${id}`,
method: 'put',
data: data
});
}