创建课程课件编辑

This commit is contained in:
unknown
2023-07-29 15:33:14 +08:00
parent d392878bf5
commit c0994dc29b
8 changed files with 302 additions and 34 deletions

View File

@@ -1,22 +1,20 @@
import client from "./internal/httpClient";
export function updateCourseAttachment(
export function storeCourseAttachmentMulti(
courseId: number,
id: number,
chapterId: number,
name: string,
type: string,
rid: number
attachments: number[]
) {
return client.put(`/backend/v1/course/${courseId}/attachment/create-batch`, {
chapter_id: chapterId,
name,
type,
sort: 0,
rid,
return client.post(`/backend/v1/course/${courseId}/attachment/create-batch`, {
attachments: attachments,
});
}
export function destroyAttachment(courseId: number, id: number) {
return client.destroy(`/backend/v1/course/${courseId}/attachment/${id}`);
}
export function transCourseAttachment(courseId: number, ids: number[]) {
return client.put(`/backend/v1/course/${courseId}/attachment/update/sort`, {
ids: ids,
});
}

View File

@@ -8,7 +8,7 @@ const GoLogin = () => {
};
const GoError = () => {
window.location.href = "/error";
// window.location.href = "/error";
};
export class HttpClient {