feat: 文件管理界面框架
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/** @format */
|
||||
|
||||
const calcSize = (img: HTMLImageElement, size: number) => {
|
||||
const src_src = Math.max(Math.min(img.width, img.height, size), 160);
|
||||
const dst_w = src_src;
|
||||
|
@@ -4,6 +4,7 @@ import web from "@/utils/axios/web.ts";
|
||||
|
||||
/**
|
||||
* 初始化minio
|
||||
* @param data 用户id
|
||||
*/
|
||||
export const initMinio = (data: any) => {
|
||||
return web.request({
|
||||
@@ -14,16 +15,20 @@ export const initMinio = (data: any) => {
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export const getBaseInfo = (data: any) => {
|
||||
/**
|
||||
* 获取文件目录信息
|
||||
* @param userId 用户id
|
||||
* @param dirName 目录名称
|
||||
* @param bucket 桶名称
|
||||
*/
|
||||
export const getDirAndFileList = (userId: any, dirName: any, bucket: any) => {
|
||||
return web.request({
|
||||
url: "/oss/oss/minio/getBaseInfo",
|
||||
method: "post",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
},
|
||||
data: {
|
||||
fileName: data,
|
||||
url: "/oss/oss/minio/listMinioDir",
|
||||
method: "get",
|
||||
params: {
|
||||
userId: userId,
|
||||
dirName: dirName,
|
||||
bucket: bucket,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user