Files
barter-app/手太欠/优迪尔-小程序/api/interfaces/teaIndex.js
张慢慢 1d6e2451a7 [上传]
2021-06-02 17:25:52 +08:00

55 lines
3.4 KiB
JavaScript

import {req} from "../request"
const index = (category_id, page) => req({url: "teacher/services", data:{category_id : category_id, page : page}}) //课程服务列表
const activity = (category_id, page) => req({url: "teacher/services/" + category_id + '/list', data:{page : page}}) //课程服务活动列表
const detailed = (active_id, page) => req({url: "teacher/services/" + active_id, data:{page : page}}) //课程服务活动详情
const classList = (page) => req({url: "teacher", data:{page : page}}) //课程列表
const courses = (learn_id, page) => req({url: "teacher/" + learn_id + '/courses', data:{page : page}}) //课程列表-二级页
const coursedet = (course_id) => req({url: "teacher/course/" + course_id + '/detail'}) //课程详情
const section = (learn_course_id, page) => req({url: "teacher/" + learn_course_id + '/sections', data:{page : page}}) //章节列表
const detail = (teacher_learn_section_id) => req({url: "teacher/section/" + teacher_learn_section_id + '/detail'}) //章节列表
const extralPlan= (section) => req({url: "teacher/section/" + section + '/extral/plan'}) //课程教案
const extralArch= (section) => req({url: "teacher/section/" + section + '/extral/architecture'}) //课程搭建图
const grades = (page) => req({url: "teacher/class", data:{page : page}}) //班级列表
const gradesDet = (active_id) => req({url: "teacher/class/" + active_id}) //班级列表-详情
const students = (class_id,page) => req({url: "teacher/class/" + class_id + '/students', data:{page : page}}) //学生列表
const classPut = (class_id,title) => req({url: "teacher/class/" + class_id, method: "PUT", data:{title : title}}) //修改班级名称
const gradesAdd = (title) => req({url: "teacher/class", method: "POST", data:{title : title}}) //新建班级名称
const remove = (class_id) => req({url: "teacher/class/" + class_id, method: "delete"}) //班级删除
const studentDet = (student_id) => req({url: "teacher/class/" + student_id + '/student'}) //学生详情
const studentDel = (student_id) => req({url: "teacher/class/" + student_id + '/student', method: "delete"}) //学生删除
// 此部分为教师端-班级-课后复习
const teach = (class_id,page) => req({url: "teacher/class/" + class_id + '/teach', data:{page : page}}) //课后复习
const teachLevel = (class_id,level_id,page) => req({url: "teacher/class/" + class_id + '/teach/' + level_id + '/courses', data:{page : page}}) //课后复习-阶段列表
const teachSection = (class_id,teach_course_id,page) => req({url: "teacher/class/" + class_id + '/teach/' + teach_course_id + '/sections', data:{page : page}}) //课后复习-阶段列表-章节列表
const teachSecDet = (class_id,teacher_learn_section_id) => req({url: "teacher/class/" + class_id + '/teach/' + teacher_learn_section_id + '/section'}) //课后复习-阶段列表-章节详情
const teachLock = (class_id,teacher_learn_section_id) => req({url: "teacher/class/" + class_id + '/teach/' + teacher_learn_section_id + '/sectionunlock', method: "POST"}) //课后复习-阶段列表-章节详情-解锁
export default({
index,
activity,
detailed,
classList,
courses,
coursedet,
section,
detail,
extralPlan,
extralArch,
grades,
gradesDet,
students,
classPut,
gradesAdd,
remove,
studentDet,
studentDel,
teach,
teachLevel,
teachSection,
teachSecDet,
teachLock
})