医学道
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
video/src/api/course.ts

29 lines
754 B

import {request} from "@/api/request";
interface HourHistorys {
course: Curriculum
data: Record<number, HourHistory[]>
hour: Hour
}
export interface CourseAllParam {
page: number
page_size: number
title?: string
dep_id: number
}
export const courseApi = {
/** 课时学习记录 */
hourHistory(courseId: string, hourId: string) {
return request<HourHistorys>(`/api/v1/course/${courseId}/hour/${hourId}/info`, "GET", {})
},
/** 获取部门课程 */
getCourseAll(data: CourseAllParam) {
return request<{ data: Curriculum[], total: number }>('/api/v1/course/all/company', "GET", data)
},
/** 删除公司课程 */
delCourse(course_id: number) {
return request(`/api/v1/course/del/${course_id}`, "DELETE")
}
}