52 lines
970 B
TypeScript
52 lines
970 B
TypeScript
![]() |
import type { ImagesType } from "@/utils/enum";
|
||
|
import { http } from "@/utils/http";
|
||
|
|
||
|
// 资源存储接口
|
||
|
export const addAnnex = (data: any) => {
|
||
|
return http({
|
||
|
method: "POST",
|
||
|
url: "/api/annex/addAnnex",
|
||
|
data,
|
||
|
});
|
||
|
};
|
||
|
|
||
|
// 获取图片资源
|
||
|
export const getAnnex = (data: {businessId: number, orderType: number, imagesType: ImagesType | any}) => {
|
||
|
return http<Resource>({
|
||
|
method: "GET",
|
||
|
url: "/api/annex/getAnnex",
|
||
|
data
|
||
|
});
|
||
|
};
|
||
|
// 批量存储资源
|
||
|
export const addListAnnex = (data: any) => {
|
||
|
return http({
|
||
|
method: "POST",
|
||
|
url: "/api/annex/addListAnnex",
|
||
|
data,
|
||
|
});
|
||
|
};
|
||
|
// 多个上传
|
||
|
export const uploadList = (data: any) => {
|
||
|
return http({
|
||
|
method: "POST",
|
||
|
header: {type: 'UPLOAD'},
|
||
|
url: "/api/file/uploadList",
|
||
|
data,
|
||
|
});
|
||
|
};
|
||
|
// 单个上传
|
||
|
export const upload = (data: any) => {
|
||
|
return http({
|
||
|
method: "POST",
|
||
|
header: {type: 'UPLOAD'},
|
||
|
url: "/api/file/upload",
|
||
|
data,
|
||
|
});
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|