mirror of
https://github.com/PlayEdu/backend
synced 2025-12-23 11:09:49 +08:00
创建课程课件编辑
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ const GoLogin = () => {
|
||||
};
|
||||
|
||||
const GoError = () => {
|
||||
window.location.href = "/error";
|
||||
// window.location.href = "/error";
|
||||
};
|
||||
|
||||
export class HttpClient {
|
||||
|
||||
Reference in New Issue
Block a user