Files
learning-system-mobile/api/modules/type.js
2022-05-29 18:59:24 +08:00

28 lines
660 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 分类
*/
import ajax from '@/utils/xajax.js'
/**
* 提取全量树形结构数据
* 包含数据全
* @param sysResType 有效性 1课程2文章3案例4问答
*/
const tree = function(sysResType) {
return ajax.get(`/xboe/type/tree-list?sysResType=${sysResType}`);
}
/**
* 按父ID查询列表
* @param sysResType 有效性 1课程2文章3案例4问答
* @param parentId 上级ID 根目录为 -1,如果为空,就是查询全部了
* @returns
*/
const list = function(sysResType, parentId) {
return ajax.get(`/xboe/type/list?sysResType=${sysResType}&parentId=${parentId}`);
}
export default {
tree,
list
}