rt-sim-training-client/src/api/jmap/lesson.js
2019-11-11 17:38:43 +08:00

76 lines
1.6 KiB
JavaScript

import request from '@/utils/request';
/** 获取发布的课程列表*/
export function getPublishLessonList() {
return request({
url: '/api/lesson',
method: 'get'
});
}
/** 获取发布列表树*/
export function getPublishLessonTree(id) {
return request({
url: `/api/lesson/${id}/tree`,
method: 'get'
});
}
/** 获取发布课程列表*/
export function getPublishLessonDetail(data) {
return request({
url: `/api/lesson/${data.id}`,
method: 'get'
});
}
/** 发布课程分页列表列表*/
export function publishLessonList(param) {
return request({
url: `/api/lesson/publishedLesson`,
method: 'get',
params: param
});
}
/** 删除发布课程*/
export function delPublishLesson(lessonId) {
return request({
url: `/api/lesson/publishedLesson/${lessonId}`,
method: 'delete'
});
}
/** 发布课程上架*/
export function putLessonOnLine(id) {
return request({
url: `/api/lesson/${id}/onLine`,
method: 'put'
});
}
/** 发布课程下架*/
export function putLessonOffLine(id) {
return request({
url: `/api/lesson/${id}/offLine`,
method: 'put'
});
}
/** 更新发布课程信息*/
export function updatePublishLesson(data) {
return request({
url: `/api/lesson/${data.id}/nameAndRemarks`,
method: 'put',
data: data
});
}
/** 获取某个地图下的发布的课程列表*/
export function getPublishLessonListByMapId(params) {
return request({
url: '/api/lesson/listOfMap',
method: 'get',
params
});
}