@sewise-dev
2018-10-27T03:32:16.000000Z
字数 11025
阅读 1170
大律司
编号 | 版本 | 说明 | 作者 | 日期 |
---|
1. 列表项
|1|v1.0|大律师api接口文档|jacky|2018-04-23|
/square/banners
application/json
GET
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
banners | array | 焦点图列表 |
Request
url: http://ip:port/square/banners
Response
{"success":true,banners:[{img:"http://xxxx"},{img:"http://xxxx"},{img:"http://xxxx"}]}
/square/subjects
application/json
GET
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
subjects | array | 焦点图列表 |
Request
url: http://ip:port/square/subjects
Response
{"success":true,banners:[{code:'601',name:'律师服务'},{code:'602',name:'医疗服务'}]}
/direct/listByPage
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为15 stime 否 string 创建开始时间,默认为空 etime 否 string 创建结束时间,默认为空 title 否 string 题目,默认为空 userinfo 是 json 用户登陆信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
Request
url: http://ip:port/direct/listByPage
Response
{"success":true,"data":[{"direct_id":"95d78585-3314-4ad7-b44d-000bf133faec","creator_uid":"admin","creator_nickname":"管理员","title":"简介简介","duration":599.099,"image":"/video/photo/?path=storage/swlsource/video/39/f4c03753.mp4","is_open_topic":1,"video_url":"","avatar":"","summary":"","require":"","create_time":"2017-02-08 16:39:54","knowledge":[{"klgid":"d5484376-85e4-4ed7-9434-b1ee92dd1fc1","title":"2","element_title":"","duration":23,"start_time":0,"end_time":23,"creator_uid":"admin","creator_nickname":"管理员","swpid":"918d03cf-3284-4da1-84ae-651529906173","swptitle":"","video_url":"storage/swlsource/video/39/f4c03753.mp4","video_name":"98888.mp4","assist_id":"","assist_url":"storage/swlsource/pdf/5b/3686c2f8.pdf","assist_name":"3686c2f8.pdf","create_time":"2017-02-08 16:39:09","image":"storage/swlsource/pdf/5b/3686c2f8/1.png","hide":"","quote_count":"","topic_ids":"","knowledge_element":[{"elgid":"6d7ab477-a543-4f6b-a179-76918bead5cc","title":"2","creator_uid":"admin","creator_nickname":"管理员","pdf_url":"","pdf_json":{"id":0,"page":1,"sTime":0,"title":"2","type":"1","eTime":23,"duration":23},"vtt_json":[],"topic_json":[],"timeline_json":"","event_timeline_json":"","duration":23,"start_time":0,"end_time":23,"create_time":"2017-02-08 16:39:09"],"_id":148}],"question_total":0,"klg_total":9,"_id":11}]}],"pages":1}
/course/allCloud
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为15 stime 否 string 创建开始时间,默认为空 etime 否 string 创建结束时间,默认为空 title 否 string 题目,默认为空 subject 否 string 行业分类 userinfo 是 json 用户登陆信息 order 否 string 显示内容类型;day:每日推荐;sale:畅销课程;score:评分排序;star:星级排序 free 否 int 是否免费;1:免费;0:收费
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
Request
url: http://ip:port/course/listByPage
Response
{"success":true,"data":[{"course_id":"95d78585-3314-4ad7-b44d-000bf133faec","creator_uid":"admin","creator_nickname":"管理员","title":"简介简介","duration":599.099,"image":"/video/photo/?path=storage/swlsource/video/39/f4c03753.mp4","is_open_topic":1,"video_url":"","avatar":"","summary":"","require":"","create_time":"2017-02-08 16:39:54","knowledge":[{"klgid":"d5484376-85e4-4ed7-9434-b1ee92dd1fc1","title":"2","element_title":"","duration":23,"start_time":0,"end_time":23,"creator_uid":"admin","creator_nickname":"管理员","swpid":"918d03cf-3284-4da1-84ae-651529906173","swptitle":"","video_url":"storage/swlsource/video/39/f4c03753.mp4","video_name":"98888.mp4","assist_id":"","assist_url":"storage/swlsource/pdf/5b/3686c2f8.pdf","assist_name":"3686c2f8.pdf","create_time":"2017-02-08 16:39:09","image":"storage/swlsource/pdf/5b/3686c2f8/1.png","hide":"","quote_count":"","topic_ids":"","knowledge_element":[{"elgid":"6d7ab477-a543-4f6b-a179-76918bead5cc","title":"2","creator_uid":"admin","creator_nickname":"管理员","pdf_url":"","pdf_json":{"id":0,"page":1,"sTime":0,"title":"2","type":"1","eTime":23,"duration":23},"vtt_json":[],"topic_json":[],"timeline_json":"","event_timeline_json":"","duration":23,"start_time":0,"end_time":23,"create_time":"2017-02-08 16:39:09"],"_id":148}],"question_total":0,"klg_total":9,"_id":11}]}],"pages":1}
/square/experts
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为8 userinfo 是 json 用户登陆信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
to_uid | int | 专家id |
to_nickname | string | 专家名称 |
avatar | string | 专家照片 |
vip | string | 专家vip |
Request
url: http://ip:port/square/experts
Response
{
"status": true,
"data": {
"data": [
{
"_id": "21",
"to_nickname": "peng1",
"to_uid": "21",
"avatar": "",
"count": 1
}
],
"totalPage": 1,
"total": 1
}
}
/square/expert
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为8 userinfo 是 json 用户登陆信息 teacher_id 是 int 老师id
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 课程内容;参考课程列表 |
user | array | 专家详情 |
user
返回字段 | 字段类型 | 说明 |
---|---|---|
avatar | string | 专家照片 |
to_uid | int | 专家id |
to_nickname | string | 专家名称 |
vip | array | 专家vip |
course | array | 总课程数 |
follow | int | 总关注数 |
myfollow | int | 我是否关注 |
Request
url: http://ip:port/square/expert
Response
{"success":true,"data":{"data":[{"courseid":'xxx',name:'xxx',count:'xx'}],"total":1,"totalPage":1}, "user": {"avatar": "","teacher_id": "21","nickname": "peng1","course": 80,"follow": 1,"myfollow": 1
}}
/square/myBuyLive
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为8 userinfo 是 json 用户登陆信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 直播内容;参考直播列表 |
Request
url: http://ip:port/square/experts
Response
{"success":true,"data":{"data":[{"courseid":'xxx',name:'xxx',count:'xx'}],"total":1,"totalPage":1}}}
/square/myBuyCourse
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为8 userinfo 是 json 用户登陆信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 课程内容;参考课程列表 |
Request
url: http://ip:port/square/experts
Response
{"success":true,"data":{"data":[{"courseid":'xxx',name:'xxx',count:'xx'}],"total":1,"totalPage":1}}}
/square/myExperts
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为8 userinfo 是 json 用户登陆信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
to_uid | int | 专家id |
to_nickname | string | 专家昵称 |
avatar | string | 专家照片 |
vip | array | 专家vip |
Request
url: http://ip:port/square/myExperts
Response
{
"status": true,
"data": {
"data": [
{
"_id": "5add88be0003d80e97675d4c",
"favouriteId": "eb888488-b3b8-412e-9fc1-27b76d20e316",
"to_uid": "13",
"to_nickname": "黄学生2",
"from_uid": "21",
"from_nickname": "peng1",
"avatar": "",
"createTime": "2018-04-23 15:18:22"
}
],
"totalPage": 1,
"total": 1
}
}
/square/favourite
application/json
POST
200
RequestBody
参数 必选 类型 说明 to_uid 是 int 专家id to_nickname 是 string 专家名称 avatar 是 string 专家照片 subject 是 string 专家所属行业 type 否 int 默认课程/课时:1;直播:2 userinfo 是 json 用户登陆信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
Request
url: http://ip:port/square/favourite
Response
{"success":true}
/square/myFollows
application/json
GET
200
RequestBody
参数 必选 类型 说明 page 否 string 页数,默认为1 size 否 string 一页显示数量,默认为8 userinfo 是 json 用户登陆信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 课程内容;参考课程列表 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
from_uid | int | 专家id |
from_nickname | string | 专家昵称 |
avatar | string | 专家照片 |
Request
url: http://ip:port/square/myFollows
Response
{"success":true,"data":{"data":[{"favouriteId":'xxx',from_uid:'xxx',from_nickname:'xx',avatar:'XXX'}],"total":1,"totalPage":1}}}
/square/follow
application/json
POST
200
RequestBody
参数 必选 类型 说明 swlid 否 string 课时id courseid 否 string 收藏课程时不需要传swlid direct_id 否 string 直播id
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
Request
url: http://ip:port/square/follow
Response
{"success":true}
/square/feedback
application/json
GET
200
RequestBody
参数 必选 类型 说明 swlid 否 string 课时id courseid 否 string 课程id direct_id 否 string 直播id
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
star | int | 星级 |
content | string | 评价内容 |
avatar | string | 用户照片 |
from_uid | int | 用户id |
from_nickname | string | 用户名称 |
createTime | string | 创建时间 |
Request
url: http://ip:port/square/follow
Response
{"success":true,data:[data:[{star:xxx,content:xxx,avatar,xxx,from_uid:xxx,from_nickname:xxx,createTime:xxx}],totalPage:1,total:1]}
/square/feedback
application/json
POST
200
RequestBody
参数 必选 类型 说明 swlid 否 string 课时id courseid 否 string 课程id;针对课程评价时,不需要传swlid direct_id 否 string 直播id content 是 string 评价内容 star 是 int 评价星级 userinfo 是 array 用户信息
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 结果 |
data | array | 内容 |
data
返回字段 | 字段类型 | 说明 |
---|---|---|
star | int | 星级 |
content | string | 评价内容 |
avatar | string | 用户照片 |
from_uid | int | 用户id |
from_nickname | string | 用户名称 |
createTime | string | 创建时间 |
Request
url: http://ip:port/square/follow
Response
{"success":true}
/course/allchapter
GET
参数 必选 类型 说明 courseid 是 string 课程id follow 否 int 点击我的收藏课程时,需要传参1 buy 否 int 点击我的购买课程时,需要传参1
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | int | 返回请求状态;true请求成功;false请求失败 |
chapter | int | 第几章节 |
study_total | int | 学习人数 |
/swl/open
POST
参数 必选 类型 说明 courseid 是 string 课程id swlid 是 string 课时id
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | int | 返回请求状态;true请求成功;false请求失败 |
/course/:courseid
GET
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 返回请求状态;true请求成功;false请求失败 |
data | array | 课程详情;参考课程列表单个课程内容 |
user | array | 用户与课程相关内容 |
user
返回字段 | 字段类型 | 说明 |
---|---|---|
avatar | string | 专家照片 |
to_uid | int | 专家id |
to_nickname | string | 专家名称 |
expertVipPrice | string | 专家vip价格 |
expertVip | string | 专家vip |
follow | array | 用户是否收藏 |
feedback | array | 用户是否评价 |
favourite | array | 用户是否关注 |
/swl/:swlid
GET
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 返回请求状态;true请求成功;false请求失败 |
data | array | 课时详情;参考课时列表单个课时内容 |
user | array | 用户与课时相关内容 |
user
返回字段 | 字段类型 | 说明 |
---|---|---|
avatar | string | 专家照片 |
to_uid | int | 专家id |
to_nickname | string | 专家名称 |
expertVipPrice | string | 专家vip价格 |
expertVip | string | 专家vip |
follow | array | 用户是否收藏 |
feedback | array | 用户是否评价 |
favourite | array | 用户是否关注 |
/square/myPrivateExperts
GET
参数 必选 类型 说明 access_token 是 string 用户token page 是 int 页数 size 是 int 每页显示数
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 返回请求状态;true请求成功;false请求失败 |
data | array | 列表 |
item
返回字段 | 字段类型 | 说明 |
---|---|---|
course | int | 课程数 |
follow | int | 关注人数 |
userId | int | 老师id |
avatar | string | 头像 |
nickName | string | 昵称 |
expireDate | string | 过期日期 |
/square/list
GET
参数 必选 类型 说明 access_token 是 string 用户token subject 否 int 行业 free 否 int 是否免费;1:免费;0:收费 size 是 int 总个数;为courseNum+liveNum之和 courseNum 是 int 课程数 liveNum 是 int 直播数
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 返回请求状态;true请求成功;false请求失败 |
data | array | 列表 |
/square/courseHot
GET
参数 必选 类型 说明 access_token 是 string 用户token size 否 int 请求数量 page 否 int 请求页数 type 否 int 获取付费=2或者免费=1数据 subject 否 String 查询分类
200
返回字段 | 字段类型 | 说明 |
---|---|---|
success | boolean | 返回请求状态;true请求成功;false请求失败 |
data | array | 列表 |