Showing
1 changed file
with
12 additions
and
5 deletions
1 | ####接口地址: | 1 | ####接口地址: |
2 | ##### /course/catalog | 2 | ##### /course/catalog |
3 | ####GET请求参数: | 3 | ####GET请求参数: |
4 | -##### id | 4 | + id (非必须) |
5 | -##### path | 5 | + path (非必须) |
6 | 6 | ||
7 | ------------------ | 7 | ------------------ |
8 | ##### 参数说明: | 8 | ##### 参数说明: |
9 | -id为课程目录的id,例如目录“教材”的id是 1,请求 /course/catalog?id=1 则返回“教材”目录下所有的二级目录 | 9 | +1.获取所有一级目录: |
10 | +id 和 path 都为空,则返回所有一级目录 | ||
10 | 11 | ||
11 | -id为空则返回所有一级目录 | 12 | +2.获得其他目录: |
13 | +id为课程目录的id,例如目录“教材”的id是 1,请求 /course/catalog?id=1 则返回“教材”目录下所有的二级目录 | ||
12 | 14 | ||
13 | path为课程目录的标识 | 15 | path为课程目录的标识 |
14 | 16 | ||
@@ -17,8 +19,8 @@ id 和 path 直传一个,两个都传,默认以id为准 | @@ -17,8 +19,8 @@ id 和 path 直传一个,两个都传,默认以id为准 | ||
17 | ------------------ | 19 | ------------------ |
18 | 20 | ||
19 | ####接口返回值为: | 21 | ####接口返回值为: |
20 | -```json | ||
21 | 返回一级目录: | 22 | 返回一级目录: |
23 | +```json | ||
22 | { | 24 | { |
23 | "catalogList": [ | 25 | "catalogList": [ |
24 | { | 26 | { |
@@ -26,6 +28,7 @@ id 和 path 直传一个,两个都传,默认以id为准 | @@ -26,6 +28,7 @@ id 和 path 直传一个,两个都传,默认以id为准 | ||
26 | "pathFlag": 100, | 28 | "pathFlag": 100, |
27 | "name": "教材", | 29 | "name": "教材", |
28 | "summary": null, | 30 | "summary": null, |
31 | + "icon":"textbook", | ||
29 | "image":"http://avatars.boxfish.cn/user/-12/figure/1411532427.jpg" | 32 | "image":"http://avatars.boxfish.cn/user/-12/figure/1411532427.jpg" |
30 | }, | 33 | }, |
31 | { | 34 | { |
@@ -33,12 +36,16 @@ id 和 path 直传一个,两个都传,默认以id为准 | @@ -33,12 +36,16 @@ id 和 path 直传一个,两个都传,默认以id为准 | ||
33 | "pathFlag": 101, | 36 | "pathFlag": 101, |
34 | "name": "文章", | 37 | "name": "文章", |
35 | "summary": null, | 38 | "summary": null, |
39 | + "icon":"listening", | ||
36 | "image":"http://avatars.boxfish.cn/user/-12/figure/1411532427.jpg" | 40 | "image":"http://avatars.boxfish.cn/user/-12/figure/1411532427.jpg" |
37 | } | 41 | } |
38 | ] | 42 | ] |
39 | } | 43 | } |
44 | +``` | ||
40 | -------------------- | 45 | -------------------- |
41 | 返回二级、三级或四级目录: | 46 | 返回二级、三级或四级目录: |
47 | + | ||
48 | +```json | ||
42 | { | 49 | { |
43 | "catalogList": [ | 50 | "catalogList": [ |
44 | { | 51 | { |
-
Please register or login to post a comment