This commit is contained in:
fuenmao
2026-08-26 11:00:10 +08:00
parent eab359d9fa
commit f1a910c25a
3 changed files with 1078 additions and 258 deletions
+11 -1
View File
@@ -3,6 +3,7 @@ import type { ReqId, ResPage } from "@/api/interface";
const taskHttp = moduleRequest("/biz/onboarding/task/");
const auditHttp = moduleRequest("/biz/onboarding/audit/");
const fileHttp = moduleRequest("/sys/dev/file/");
export interface OnboardingTask {
id: number;
@@ -178,6 +179,15 @@ export const onboardingTaskApi = {
return taskHttp.get("detail", params);
},
/** 使用后台登录令牌读取文件流,供入职材料下载和图片预览使用。 */
downloadFile(fileId: number) {
return fileHttp.get<any>(
"download",
{ id: fileId },
{ responseType: "blob", loading: false, cancel: false }
);
},
create(params: Record<string, unknown>) {
return taskHttp.post("create", params);
},
@@ -543,4 +553,4 @@ export const onboardingPublicApi = {
deleteMaterial(params: { token: string; taskMaterialId: number }) {
return publicHttp.post("delete-material", params);
}
};
};