@zongwu
2016-12-30T02:29:45.000000Z
字数 2093
阅读 510
开发设计
为3.6.0培训功能设计的相关接口
{
"id": 101,
"title": "实习店员",
"description": "实习店员是迈向人生巅峰的第一步啊",
"status": 2,// 0-未解锁 1-进行中 2-已通过
"passedCount": 10,
"totalCount": 10
}
{
"id": 10011,
"title": "思维与心态",
"description": "完成了这些培训,你往高富帅又踏进了一步!",
"online": false,
"status": 0,// 0-未学习 1-进行中 2-已通过
"passedCount": 5,
"totalCount": 6
}
{
"online": false,
"title": "课时1:如何判断顾客类型",
"status": 1, // 0-未考试 1-金 2-银 3-铜 4-铁
"redirect": "http://www.healthbok-inc.com/course/11/",
"paperId":101 // 课件(文章)关联的试卷编号
}
作者:陈俊棋
接口名:pd.achievement.fetch
接口描述:获取职业体系下的成就地图(即:储备店员、店员、储备班长、班长、储备店长、店长)。
参数:
0. (String) sessionId // 必填
1. (long) achievementType // 必填 achievementType = 1 表示职业体系成就
返回:
{
"success": true,
"msgCode": null,
"msgInfo": null,
"count": 0,
"model": {
"type": 1,
"isHot":false,// 是否有小红点的标志
"achievements": [ // 要求按等级高低排序
{
/* 此处——成就详情结构 */
}
]
}
}
作者:陈俊棋
接口名:pd.achievement.detail
接口描述:依据 成就ID 查询要做的事项(即:传入 “实习店员”成就ID,查询“实习店员”要做的相关事宜)。
// "inShelf" 这个字段只在查询成就详情中有。如果为true,表示该课程已经上架可以点击进入详情。
//如果为false,表示课程已下架不可以点到详情里面去。
参数:
0. (String) sessionId // 必填
1. (long) achievementId // 必填 成就编号 (如下例: 1001)
返回:
{
"success": true,
"msgCode": null,
"msgInfo": null,
"count": 0,
"model": {
/* 此处——成就详情结构 */
"events": [
{
/* 此处——课程结构 */
}
]
}
}
作者:陈俊棋
接口名:pd.course.fetch
接口描述:查询【非职业】培训包含的课程,可能是多个培训的课程组成的数组。
参数:
0. (String) sessionId // 必填
1. (int) type // 必填 type = 2 非职业 培训的课程
返回:
{
"success": true,
"msgCode": null,
"msgInfo": null,
"count": 0,
"model": {
"title": "热门培训",
"description": "完成了这些培训,你往高富帅又踏进了一步!",
"passedCount": 5,
"totalCount": 6,
"courses": [
{
/* 此处——课程结构 */
},
{
/* 此处——课程结构 */
}
]
}
}
作者:陈俊棋
接口名:pd.lesson.fetch
接口描述:依据 课程ID 查询 课件列表。
参数:
0. (String) sessionId // 必填
1. (long) courseId // 必填 课程编号
返回:
{
"success": true,
"msgCode": null,
"msgInfo": null,
"count": 0,
"model": {
/* 此处 —— 课程结构*/
"lessons": [
{
/* 此处——课件结构 */
}
]
}
}
作者:陈俊棋
接口名:pd.train.signup
接口描述:报名培训课程
参数:
0. (String) sessionId // 必填
1. (long) courseId // 必填 课程编号
返回:
{
"success": true,
"msgCode": null,
"msgInfo": null,
"model": true
}
作者:陈俊棋
接口名:pd.train.detail
接口描述:培训详情页面
参数:
0. (String) sessionId // 必填
1. (long) courseId // 必填 课程编号
返回:
{
"success": true,
"msgCode": null,
"msgInfo": null,
"model": {
"isSignUp":false,
"course":{
/* 此处——课程结构 */
},
"offLine":{
"teacher":"王老师",
"time":"2016年12月12日 14:00",
"address":"文一西路998号海创园18幢701",
"period":"60分钟" // 培训时长
}
}
}