11
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user