ajax配置

This commit is contained in:
zhaofang
2022-09-14 13:52:44 +08:00
parent a180deb5d1
commit f49b4d3ab1
22 changed files with 305 additions and 98 deletions

View File

@@ -1,23 +0,0 @@
// import ajax from '@/utils/xajax.js'
import ajax from '../cesource/index.js';
/**
* 显示提取,一次性
* */
const list=function (){
return ajax.get('/xboe/subgroup/m/guide/list');
}
/**
* 保存或编辑
* */
const save=function (data){
return ajax.postJson('/xboe/subgroup/m/guide/save',data);
}
export default {
list,
save
}

View File

@@ -1,89 +0,0 @@
// 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);
}
/**
* 我的笔记
* type 我发布的是1 我导入的是2
* orderType 升序降序
* orderField排序字段
* courseId 课程id
* */
const query=function (data){
return ajax.post('/xboe/subgroup/m/noteinfo/query',data);
}
/**
* 课程列表 应该是当前用户记过笔记的课程
* */
const course=function (){
return ajax.get('/xboe/subgroup/m/noteinfo/course');
}
export default {
save,
detail,
del,
coursePage,
myCourse,
history,
pagelist,
query,
course
}

View File

@@ -1,26 +0,0 @@
// import ajax from '@/utils/xajax.js'
import ajax from '../cesource/index.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='+key);
}
export default {
saveOrUpdate,
detail
}

View File

@@ -1,54 +0,0 @@
// import ajax from '@/utils/xajax.js'
import ajax from '../cesource/index.js'
/**
* 用户采集的添加
* @param{
* type 类型 1表课程分类
* refId 关联的id
* refCode 关联的code
* }
* */
const save=function (data){
return ajax.postJson('/xboe/subgroup/m/userhobby/save',data);
}
/**
* 同兴趣人匹配查询
* 参数:下面那个接口的返回值直接传
* */
const list=function (data){
return ajax.postJson('/xboe/subgroup/m/userhobby/list',data);
}
/**
* 获取用户兴趣关联的id
* */
const info=function (){
return ajax.get('/xboe/subgroup/m/userhobby/info');
}
/**
* 修改用户兴趣爱好兴趣爱好,
* 参数是上一个接口 info查出来的返回值
* */
const update=function (data){
return ajax.postJson('/xboe/subgroup/m/userhobby/update',data);
}
/**
* 删除
* */
const del=function (id){
return ajax.get('/xboe/subgroup/m/userhobby/delete?id='+id);
}
export default {
save,
list,
info,
update,
del
}