diff --git a/src/api/userCenter.ts b/src/api/userCenter.ts index d3d29c3..1695c1d 100644 --- a/src/api/userCenter.ts +++ b/src/api/userCenter.ts @@ -10,13 +10,14 @@ import { Ref } from "vue"; * @description 转班学生导入 * @return {void} */ -export function ImportTransferStudent(data) { - +export function ImportTransferStudent(file) { + let formData = new FormData(); + formData.append("file", file); return http.request>( "post", `userCenter/back/users/importtransferstudent`, { - data + data: formData }, { headers: { @@ -30,12 +31,14 @@ export function ImportTransferStudent(data) { * @description 退班学生导入 * @return {void} */ -export function ImportStudentOut(data: any) { +export function ImportStudentOut(file: any) { + let formData = new FormData(); + formData.append("file", file); return http.request>( "post", `userCenter/back/users/importstudentout`, { - data + data: formData }, { headers: {