add lesson api
parent
cc0c602def
commit
208ed03fc3
319
mock-config.json
319
mock-config.json
|
|
@ -511,14 +511,319 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/lesson/category",
|
||||
"response": {
|
||||
"categories": [
|
||||
{ "id": "recommend", "name": "推荐", "icon": "https://res.klyj.jinzejk.com/img/c01.png" },
|
||||
{ "id": "mobile", "name": "手机电脑", "icon": "https://res.klyj.jinzejk.com/img/c02.png" },
|
||||
{ "id": "calligraphy", "name": "书法学习", "icon": "https://res.klyj.jinzejk.com/img/c03.png" },
|
||||
{ "id": "instrument", "name": "乐器弹奏", "icon": "https://res.klyj.jinzejk.com/img/c04.png" },
|
||||
{ "id": "art", "name": "美术", "icon": "https://res.klyj.jinzejk.com/img/c05.png" }
|
||||
]
|
||||
},
|
||||
"swagger": {
|
||||
"summary": "获取课程分类",
|
||||
"description": "返回课程模块的分类项(带图标)",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "分类数据",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"categories": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"name": { "type": "string" },
|
||||
"icon": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/lesson/list",
|
||||
"response": {
|
||||
"category": "推荐",
|
||||
"total": 4,
|
||||
"items": [
|
||||
{
|
||||
"id": "lesson001",
|
||||
"title": "隶属的古法用笔技巧",
|
||||
"image": "https://res.klyj.jinzejk.com/img/lesson1.png",
|
||||
"price": 0.0,
|
||||
"chapterCount": 7,
|
||||
"learnCount": 6525,
|
||||
"label": "免费"
|
||||
},
|
||||
{
|
||||
"id": "lesson002",
|
||||
"title": "六十三个常用行书字",
|
||||
"image": "https://res.klyj.jinzejk.com/img/lesson2.png",
|
||||
"price": 9.9,
|
||||
"chapterCount": 3,
|
||||
"learnCount": 6525
|
||||
},
|
||||
{
|
||||
"id": "lesson003",
|
||||
"title": "如何学习使用微信",
|
||||
"image": "https://res.klyj.jinzejk.com/img/lesson3.png",
|
||||
"price": 9.9,
|
||||
"chapterCount": 3,
|
||||
"learnCount": 6525
|
||||
},
|
||||
{
|
||||
"id": "lesson004",
|
||||
"title": "易道字体教学",
|
||||
"image": "https://res.klyj.jinzejk.com/img/lesson4.png",
|
||||
"price": 9.9,
|
||||
"chapterCount": 3,
|
||||
"learnCount": 6525
|
||||
}
|
||||
]
|
||||
},
|
||||
"swagger": {
|
||||
"summary": "获取课程学习列表",
|
||||
"description": "返回推荐课程列表数据(包含课程封面、价格、节数、学习人数等)",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "课程数据",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category": { "type": "string" },
|
||||
"total": { "type": "integer" },
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"image": { "type": "string" },
|
||||
"price": { "type": "number" },
|
||||
"chapterCount": { "type": "integer" },
|
||||
"learnCount": { "type": "integer" },
|
||||
"label": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/course/detail",
|
||||
"query": {
|
||||
"courseId": "course_001"
|
||||
},
|
||||
"response": {
|
||||
"id": "course_001",
|
||||
"title": "隶属的古法用笔技巧-第一节",
|
||||
"coverImage": "https://res.klyj.jinzejk.com/img/course_001.png",
|
||||
"videoUrl": "https://res.klyj.jinzejk.com/video/83c5cc4974b779562fb56f6970d6d888.mp4",
|
||||
"duration": "17:03",
|
||||
"played": "4:15",
|
||||
"price": 120.0,
|
||||
"lessonCount": 4,
|
||||
"isFree": false,
|
||||
"description": "本课程系统讲解隶属书法(隶书)的古法用笔技巧,从基础笔画到进阶创作,结合秦汉经典碑帖。",
|
||||
"teacher": {
|
||||
"name": "刘教授",
|
||||
"avatar": "https://res.klyj.jinzejk.com/img/teacher_liu.png",
|
||||
"tag": "金牌讲师",
|
||||
"bio": "耐心细致,语言通俗,擅长用生活例子讲解手训功能。课程字号大、步骤清晰,每步骤配实物示意图课件穿插。"
|
||||
},
|
||||
"coursePlan": {
|
||||
"schedule": "每周日上午 6:30-10:30",
|
||||
"teacher": "创老师 / 小曹老师",
|
||||
"targetAge": "4-12岁儿童"
|
||||
},
|
||||
"courseGains": [
|
||||
"精选五古名句,帮助记忆理解",
|
||||
"巩固学习成果,提升文化修养"
|
||||
],
|
||||
"priceInfo": {
|
||||
"originalPrice": 698,
|
||||
"limitedPrice": 368,
|
||||
"isLimited": true
|
||||
},
|
||||
"materialsIncluded": true,
|
||||
"extra": {
|
||||
"notice": "课程内容贴合实际场景,以“听得懂、学得会、用得上”为目标,针对性强,注重实效性。",
|
||||
"qrCode": "https://res.klyj.jinzejk.com/img/qrcode.png"
|
||||
}
|
||||
},
|
||||
"swagger": {
|
||||
"summary": "获取课程详情信息",
|
||||
"description": "包含课程标题、讲师、价格、安排、收获、试听进度等信息",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "课程详情数据",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"coverImage": { "type": "string" },
|
||||
"videoUrl": { "type": "string" },
|
||||
"duration": { "type": "string" },
|
||||
"played": { "type": "string" },
|
||||
"price": { "type": "number" },
|
||||
"lessonCount": { "type": "integer" },
|
||||
"isFree": { "type": "boolean" },
|
||||
"description": { "type": "string" },
|
||||
"teacher": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": { "type": "string" },
|
||||
"avatar": { "type": "string" },
|
||||
"tag": { "type": "string" },
|
||||
"bio": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"coursePlan": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schedule": { "type": "string" },
|
||||
"teacher": { "type": "string" },
|
||||
"targetAge": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"courseGains": {
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
"priceInfo": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"originalPrice": { "type": "number" },
|
||||
"limitedPrice": { "type": "number" },
|
||||
"isLimited": { "type": "boolean" }
|
||||
}
|
||||
},
|
||||
"materialsIncluded": { "type": "boolean" },
|
||||
"extra": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"notice": { "type": "string" },
|
||||
"qrCode": { "type": "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "/api/lesson/catalog",
|
||||
"query": {
|
||||
"courseId": "course_001"
|
||||
},
|
||||
"response": {
|
||||
"courseId": "course_001",
|
||||
"title": "隶属的古法用笔技巧",
|
||||
"price": 120.0,
|
||||
"chapterCount": 4,
|
||||
"chapters": [
|
||||
{
|
||||
"index": 1,
|
||||
"title": "秦汉隶属的历史背景",
|
||||
"duration": "15:43",
|
||||
"playCount": 9990,
|
||||
"isTrial": true,
|
||||
"isLocked": false
|
||||
},
|
||||
{
|
||||
"index": 2,
|
||||
"title": "古法执笔与运腕",
|
||||
"duration": "15:43",
|
||||
"playCount": 9990,
|
||||
"isTrial": true,
|
||||
"isLocked": false
|
||||
},
|
||||
{
|
||||
"index": 3,
|
||||
"title": "墨法与笔法的结合",
|
||||
"duration": "15:43",
|
||||
"playCount": 9990,
|
||||
"isTrial": false,
|
||||
"isLocked": true
|
||||
},
|
||||
{
|
||||
"index": 4,
|
||||
"title": "笔势的连贯与呼应",
|
||||
"duration": "15:43",
|
||||
"playCount": 9990,
|
||||
"isTrial": false,
|
||||
"isLocked": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"swagger": {
|
||||
"summary": "获取课程章节目录",
|
||||
"description": "根据课程ID获取课程目录详情",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "章节列表数据",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"courseId": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"price": { "type": "number" },
|
||||
"chapterCount": { "type": "integer" },
|
||||
"chapters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"index": { "type": "integer" },
|
||||
"title": { "type": "string" },
|
||||
"duration": { "type": "string" },
|
||||
"playCount": { "type": "integer" },
|
||||
"isTrial": { "type": "boolean" },
|
||||
"isLocked": { "type": "boolean" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in New Issue