| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import request from '@/config/axios'
- // 课程 VO
- export interface CourseVO {
- id: number // 课程d
- courseName: string // 课程名称
- courseContentType: "all", // 课程内容类型
- courseImagePath: undefined, // 课程图片路径
- courseVideoPath: undefined, // 课程视频路径
- courseMusicPath: undefined, // 课程音乐路径
- courseFilePath: undefined, // 课程文件路径
- courseContent: undefined, // 课程内容
- courseAuthor: string // 课程作者
- courseTeacher: string // 课程老师
- courseSize: number // 课程大小
- courseTime: number // 课程时长
- courseIsInspect: false // 课程是否有检查
- courseType: number // 课程类型
- courseTypeName: string // 课程类型
- courseLabel: string // 课程标签
- courseOrder: number // 课程排序
- courseStatus: "0" // 课程状态
- tenantId: Number // 租户id
- }
- // 课程 API
- export const CourseApi = {
- // 查询课程分页
- getCoursePage: async (params: any) => {
- return await request.get({ url: `/bjdx/course/page`, params })
- },
- // 查询课程详情
- getCourse: async (id: number) => {
- return await request.get({ url: `/bjdx/course/get?id=` + id })
- },
- // 新增课程
- createCourse: async (data: CourseVO) => {
- return await request.post({ url: `/bjdx/course/create`, data })
- },
- // 修改课程
- updateCourse: async (data: CourseVO) => {
- return await request.put({ url: `/bjdx/course/update`, data })
- },
- // 删除课程
- deleteCourse: async (id: number) => {
- return await request.delete({ url: `/bjdx/course/delete?id=` + id })
- },
- // 导出课程 Excel
- exportCourse: async (params) => {
- return await request.download({ url: `/bjdx/course/export-excel`, params })
- },
- // 根据类型id获取课程列表
- getCourseByTypeId: async (typeId: String) => {
- return await request.get({ url: `/bjdxWeb/course/getCourseByTypeId?typeId=` + typeId })
- },
- // 取课程列表
- getCourseTypeTree: async () => {
- return await request.get({ url: `/bjdxWeb/course/getCourseTypeTree`})
- }
- }
|