文档
测试

文章分类列表

GET
/sys/class/getAllParentClass

接口描述

2021 - 08 新增 新一级分类 旧一级分类改为 二级分类

请求头

参数名
类型
描述
必填
token
String
必填

请求参数

参数名
类型
描述
必填
type
int
0 全部 1 课程 2题库 3论坛 4 文章
必填

响应参数

参数名
类型
描述
必填
int
code
状态码 0 成功 其他失败
必填
msg
String
响应信息
必填
obj
Array
分类列表
必填

说明 / 示例

## `返回示例 - 带注释` ```java { "code": 0, "msg": "请求成功", "obj": [ // 一级分类数据 { "id": 303, // 新一级分类id "name": "测试新一级分类大大大", "cid": -1, // 父类 id 新 一级分类 固定为 -1 "img": "xxx", // 分类图片 "status": "1", // 状态:0取消 1正常 "addtime": "2021-08-09 09:41:28", // 创建时间 "sort": 2, // 排序 "type": 1, // 分类 1 课程 2题库 3论坛 4 文章 "doCount": 0, // 做题人数 题库分类才有 "totalTopicNum": 0, // 总题量 题库分类才有 "answerTotalNum": 0, // 已答题数 题库分类才有 "pid": null, // 二级分类的上级分类id 一级分类 为null "childrenTypes": [ // 二级分类数据 { "id": 31, "name": "幼儿综合素质", "cid": 0, // 父类 id 新 一级分类 固定为 0 "img": "xxx", "status": "1", "addtime": "2021-03-27 15:47:25", "sort": 2, "type": 1, "doCount": 0, "totalTopicNum": 0, "answerTotalNum": 0, "pid": 15, "childrenTypes": null, "subjectList": null } ], "subjectList": null } ] } ``` ## `返回示例 - 不带注释` ```java { "code": 0, "msg": "请求成功", "obj": [ { "id": 303, / "name": "测试新一级分类大大大", "cid": -1, "img": "xxx", "status": "1", "addtime": "2021-08-09 09:41:28", "sort": 2, "type": 1, "doCount": 0, "totalTopicNum": 0, "answerTotalNum": 0, "pid": null, "childrenTypes": [ { "id": 31, "name": "幼儿综合素质", "cid": 0, "img": "xxx", "status": "1", "addtime": "2021-03-27 15:47:25", "sort": 2, "type": 1, "doCount": 0, "totalTopicNum": 0, "answerTotalNum": 0, "pid": 15, "childrenTypes": null, "subjectList": null } ], "subjectList": null } ] } ```