mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-25 02:32:52 +08:00
70 lines
1.2 KiB
JavaScript
70 lines
1.2 KiB
JavaScript
// import ajax from '@/utils/xajax.js'
|
|
import ajax from '../cesource/index.js';
|
|
|
|
|
|
/**
|
|
* 添加或者编辑
|
|
* @param 参数见设计文档
|
|
* */
|
|
const save=function (data){
|
|
return ajax.postJson('/xboe/subgroup/m/noteinfo/save',data);
|
|
}
|
|
|
|
/**
|
|
* 详情
|
|
* */
|
|
const detail=function (id){
|
|
return ajax.get('/xboe/subgroup/m/noteinfo/detail?id='+id);
|
|
}
|
|
|
|
/**
|
|
* 删除笔记
|
|
* */
|
|
const del=function (id){
|
|
return ajax.get('/xboe/subgroup/m/noteinfo/delete?id='+id);
|
|
}
|
|
|
|
/**
|
|
* 查询课程笔记
|
|
* @param{
|
|
* pageIndex
|
|
* pageSize
|
|
* courseId 课程id
|
|
* openType 公开类型
|
|
* }
|
|
* */
|
|
const coursePage=function (query){
|
|
return ajax.post('/xboe/subgroup/m/noteinfo/course',query);
|
|
}
|
|
|
|
/**
|
|
* 查询我的指定课程笔记
|
|
* */
|
|
const myCourse=function (courseId){
|
|
return ajax.get('/xboe/subgroup/m/noteinfo/mycourse?courseId='+courseId);
|
|
}
|
|
|
|
/**
|
|
* 查询笔记的修改历史
|
|
* */
|
|
const history=function (noteId){
|
|
return ajax.get('/xboe/subgroup/m/noteinfo/modify/history?noteId='+noteId);
|
|
}
|
|
|
|
/**
|
|
* 分页查询我发布的,收藏的,点赞的笔记
|
|
* */
|
|
const pagelist=function (query){
|
|
return ajax.get('/xboe/subgroup/m/noteinfo/pagelist',query);
|
|
}
|
|
|
|
export default {
|
|
save,
|
|
detail,
|
|
del,
|
|
coursePage,
|
|
myCourse,
|
|
history,
|
|
pagelist
|
|
}
|