diff --git a/src/api/modules/guide.js b/src/api/modules/guide.js new file mode 100644 index 00000000..18ae4eeb --- /dev/null +++ b/src/api/modules/guide.js @@ -0,0 +1,22 @@ +import ajax from '@/utils/xajax.js' + + +/** + * 显示提取,一次性 + * */ +const list=function (){ + return ajax.get('/xboe/subgroup/m/guide/list'); +} + +/** + * 保存或编辑 + * */ +const saveOrUpdate=function (data){ + return ajax.postJson('/xboe/subgroup/m/guide/saveOrUpdate',data); +} + + +export default { + list, + saveOrUpdate +} diff --git a/src/api/modules/note.js b/src/api/modules/note.js new file mode 100644 index 00000000..2501dd5e --- /dev/null +++ b/src/api/modules/note.js @@ -0,0 +1,68 @@ +import ajax from '@/utils/xajax.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 +} diff --git a/src/api/modules/place.js b/src/api/modules/place.js new file mode 100644 index 00000000..edf92d50 --- /dev/null +++ b/src/api/modules/place.js @@ -0,0 +1,24 @@ +import ajax from '@/utils/xajax.js' + + + +/** + * 添加或编辑 + * @param 参数见设计文档 + * */ +const saveOrUpdate=function (data){ + return ajax.postJson('/xboe/subgroup/m/pageplace/saveOrUpdate',data); +} + +/** + * 根据key获取资源信息 + * */ +const detail=function (key){ + return ajax.get('/xboe/subgroup/m/pageplace/detail?key='+key); +} + + +export default { + saveOrUpdate, + detail +} diff --git a/src/api/modules/userstart.js b/src/api/modules/userstart.js new file mode 100644 index 00000000..a0b545e8 --- /dev/null +++ b/src/api/modules/userstart.js @@ -0,0 +1,30 @@ +import ajax from '@/utils/xajax.js' + + + +/** + * 用户的累计信息 + * @param{ + * types 数组 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数 + * } + * */ +const user=function (query){ + return ajax.post('/xboe/stat/m/user/current/user',query); +} + +/** + * 前num的排名 + * @parm{ + * statType 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数 + * field todays,weeks,months,years.total + * num 条数 + * } + * */ +const ranking=function (query){ + return ajax.post('/xboe/stat/m/user/ranking/user',query); +} + +export default { + user, + ranking +}