Learn.Archives.Web/src/api/exam.ts

25 lines
512 B
TypeScript

import { http } from "@/utils/http";
import type { Res } from "@/utils/http/types";
/**
* @description 导入表单
* @return {object}
*/
export function ImportExamInfo(id: number, file: File) {
let formData = new FormData();
formData.append("eId", id.toString());
formData.append("file", file);
return http.request<any>(
"post",
`ExamClassInfo/Import`,
{
data: formData
},
{
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
}
);
}