rt-sim-training-client/src/api/quest.js

41 lines
867 B
JavaScript
Raw Normal View History

2019-07-26 13:32:43 +08:00
import request from '@/utils/request';
/** 分页查找仿真任务*/
export function getQuestPageList(params) {
return request({
url: `/api/quest/paging`,
method: 'get',
params: params
});
}
/** 创建任务 */
export function createQuest(data) {
return request({
url: `/api/quest`,
method: 'post',
data
});
}
/** 根据任务id删除任务 */
export function deleteQuest(id) {
return request({
url: `/api/quest/${id}`,
method: 'delete'
});
}
/** 根据id查询任务基础信息 */
export function getQuestById(id) {
return request({
url: `/api/quest/${id}`,
method: 'get',
});
}
/** 更新任务基本信息 */
export function updateQuest(id, data) {
return request({
url: `/api/quest/${id}`,
method: 'put',
data
});
}