import request from '@/utils/request'; /** 查找个人录制的仿真任务*/ export function getQuestPageList(mapId) { return request({ url: `/api/script/${mapId}/list`, // url: `/api/script/draft/list/${mapId}`, method: 'get' }); } /** 创建任务 */ export function createQuest(data) { return request({ url: `/api/script`, // url: `/api/script/draft/create`, method: 'post', data }); } /** 根据任务id删除任务 */ export function deleteQuest(id) { return request({ url: `/api/script/${id}`, // url: `/api/script/draft/${id}/delete`, method: 'delete' }); } /** 根据id查询任务基础信息 */ export function getQuestById(id) { return request({ url: `/api/script/${id}/basic`, // url: `/api/script/draft/${id}/basic`, method: 'get' }); } /** 根据id查询任务基础信息 */ export function getQuestByIdList(id) { return request({ url: `/api/quest/${id}/detail`, method: 'get' }); } /** 更新任务基本信息 */ export function updateQuest(id, data) { return request({ url: `/api/script/${id}`, // url: `/api/script/draft/${id}/update`, method: 'put', data }); } /** 分页查找上线的仿真任务*/ export function getQuestPageListOnline(params) { return request({ url: `/api/quest/paging/online`, method: 'get', params: params }); }