公共接口平台 logo 公共接口平台

后端教务

课程、课期、课时、公开课、视频点播


公开课查询列表

api/v1/publicCourse POST

Query Parameters

Parameter Status Description
pageIndex optional 页码
pageSize optional 每页显示数量
category optional 分类ID public_course_category
keywords optional 模糊查询参数
count optional 是否返回结果集数量(Y:是 N:否)
withCategory optional 是否携带分类信息(Y:是 N:否)

Example response (200):

{
    "data": [],
    "count": 0
}

公开课详情

api/v1/publicCourse/{course} GET

Body Parameters

Parameter Type Status Description
course integer required 课程ID

Query Parameters

Parameter Status Description
ac optional 是否记录(Y:是 N:否)

Example response (200):

{
    "id": 1,
    "title": "标题",
    "short": "简短介绍",
    "cover": "封面图",
    "category": 1,
    "with_category": {
        "id": 3,
        "keywords": "",
        "name": "经济经营",
        "pid": 1
    },
    "status": 1,
    "video_id": 0,
    "video_url": "",
    "external_url": "",
    "intro": "详情",
    "weight": 0,
    "view": 32,
    "created_by": 3,
    "deleted_at": null,
    "created_at": "2019-03-06 10:53:08",
    "updated_at": "2019-03-20 18:04:36",
    "time": "2周前"
}

课程列表

api/v1/course POST

Query Parameters

Parameter Status Description
pageIndex optional 页码
pageSize optional 每页显示数量
category optional 分类ID
withCategory optional 携带分类(Y:是 N:否)
withMajor optional 携带专业(Y:是 N:否)
withType optional 携带类型(Y:是 N:否)

Example response

{
"data": [],
"count": 0
}

课程详情

api/v1/course/{course} GET

Query Parameters

Parameter Status Description
withPeriods optional 携带课期列表(Y:是 N:否)

Example response (200):

{
    "id": 9,
    "label": "计量经济学基础",
    "coverImg": "\/storage\/uploads\/KbRYvdBbC7yvZsftPyQHoOHncw7bo9oWMPq4KIA9.jpeg",
    "category": 18,
    "major": 10,
    "type": 3,
    "description": "",
    "deleted_at": null,
    "created_at": "2019-01-08 14:13:51",
    "updated_at": "2019-01-08 14:13:51",
    "time": "2个月前",
    "with_category": [
        {
            "id": 18,
            "name": "专业知识考点",
            "keywords": "",
            "pid": 14
        }
    ],
    "with_major": [
        {
            "id": 10,
            "name": "EMS经济塾",
            "keywords": "",
            "pid": 9
        }
    ],
    "with_type": [
        {
            "id": 3,
            "name": "大学院",
            "keywords": "daxueyuan",
            "pid": 2
        }
    ],
    "with_periods": [
        {
            "id": 12,
            "course_id": 9,
            "label": "2019四月期",
            "headmaster_id": 10,
            "price": 0,
            "volume": 30
        }
    ]
}

课期详情

api/v1/course/period/{period} GET

Query Parameters

Parameter Status Description
withCourse optional 携带课程信息(Y:是 N:否)
withSections optional 携带课时信息(Y:是 N:否)
withHeadmaster optional 携带班主任信息(Y:是 N:否)

Example response (200):

{
    "id": 1,
    "course_id": 1,
    "label": "2018期",
    "headmaster_id": 8,
    "price": 0,
    "volume": 30,
    "description": "",
    "published_at": "2019-01-21 18:04:56",
    "created_at": "2018-12-28 13:39:44",
    "updated_at": "2019-01-21 18:04:56",
    "time": "3个月前"
}

课时详情

api/v1/course/section/{section} GET

Query Parameters

Parameter Status Description
withCourse optional 携带课程(Y:是 N:否)
withPeriod optional 携带课期(Y:是 N:否)
withBrothers optional 携带所有课时(Y:是 N:否)
withTeacher optional 携带视频(Y:是 N:否)

Example response (200):

{
    "id": 1,
    "period_id": 6,
    "label": "第1课时",
    "node": 1,
    "teacher_id": 9,
    "homework": "",
    "start_time": "2019-03-06 17:30:00",
    "duration": 90,
    "detail": "系统排课",
    "created_by": 3,
    "updated_by": 3,
    "created_at": "2018-12-28 17:54:00",
    "updated_at": "2018-12-29 11:38:07",
    "with_video": {
        "id": 1,
        "size": 58069373,
        "duration": "235.3917"
    }
}

获取教务选项

api/v1/option/education GET

Body Parameters

Parameter Type Status Description
keywords string required 关键词(多个','隔开)

Example response (200):

{
    "keywords1": [
        {},{}
    ],
    "keywords2": [
        {},{},{}
    ]
}

前端数据选项

api/v1/option/front GET

Body Parameters

Parameter Type Status Description
keywords string required 关键词(多个','隔开)

Example response (200):

{
    "keywords1": [
        {},{}
    ],
    "keywords2": [
        {},{},{}
    ]
}

视频播放授权

api/v1/guard/video/{video}/playAuth GET

Body Parameters

Parameter Type Status Description
video integer required 视频ID

Example response (200):

{
    "RequestId": "02567B91-92F4-4508-B687-1D1AA845998D",
    "VideoMeta": {
        "CoverURL": "...",
        "Status": "Normal",
        "VideoId": "...",
        "Duration": 235.39169311523438,
        "Title": "..."
    },
    "PlayAuth": "..."
}