2024-03-09 12:37:17 +00:00
|
|
|
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,
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
// 获取图片资源
|
2024-03-12 05:34:36 +00:00
|
|
|
export const getAnnex = (data: {businessId: string, orderType: number, imagesType: ImagesType | any}) => {
|
2024-03-09 12:37:17 +00:00
|
|
|
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,
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2024-03-21 05:52:15 +00:00
|
|
|
// 删除图片
|
|
|
|
export const deleteById = (data: any) => {
|
|
|
|
return http({
|
|
|
|
method: "POST",
|
|
|
|
url: "/api/annex/delete",
|
|
|
|
data,
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2024-03-09 12:37:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|