2019-07-26 13:32:43 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
|
2019-08-12 19:30:50 +08:00
|
|
|
/** 分页查找个人录制的仿真任务*/
|
2019-07-26 13:32:43 +08:00
|
|
|
export function getQuestPageList(params) {
|
2019-08-08 14:32:32 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/paging`,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 创建任务 */
|
|
|
|
export function createQuest(data) {
|
2019-08-08 14:32:32 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest`,
|
|
|
|
method: 'post',
|
|
|
|
data
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 根据任务id删除任务 */
|
|
|
|
export function deleteQuest(id) {
|
2019-08-08 14:32:32 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}`,
|
|
|
|
method: 'delete'
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 根据id查询任务基础信息 */
|
|
|
|
export function getQuestById(id) {
|
2019-08-08 14:32:32 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
2019-08-01 15:19:24 +08:00
|
|
|
}
|
|
|
|
/** 根据id查询任务基础信息 */
|
|
|
|
export function getQuestByIdList(id) {
|
2019-08-08 14:32:32 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}/detail`,
|
|
|
|
method: 'get'
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
|
|
|
/** 更新任务基本信息 */
|
|
|
|
export function updateQuest(id, data) {
|
2019-08-08 14:32:32 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}`,
|
|
|
|
method: 'put',
|
|
|
|
data
|
|
|
|
});
|
2019-08-08 10:31:46 +08:00
|
|
|
}
|
|
|
|
/** 更新任务地图定位信息 */
|
|
|
|
export function updateMapLocation(id, data) {
|
2019-08-08 14:32:32 +08:00
|
|
|
return request({
|
|
|
|
url: `/api/quest/${id}/mapLocation`,
|
|
|
|
method: 'put',
|
|
|
|
data
|
|
|
|
});
|
2019-07-26 13:32:43 +08:00
|
|
|
}
|
2019-08-12 19:30:50 +08:00
|
|
|
|
|
|
|
/** 分页查找上线的仿真任务*/
|
|
|
|
export function getQuestPageListOnline(params) {
|
|
|
|
return request({
|
|
|
|
url: `/api/quest/paging/online`,
|
|
|
|
method: 'get',
|
|
|
|
params: params
|
|
|
|
});
|
|
|
|
}
|