perf: 部署支持1Panel

This commit is contained in:
xiaojunnuo
2024-09-27 02:15:41 +08:00
parent 3f21a49988
commit d047234d98
20 changed files with 342 additions and 95 deletions
@@ -0,0 +1,31 @@
import { request } from "/@/api/service";
export type ComponentPropsType = {
type: string;
typeName: string;
action: string;
form: any;
value?: any;
};
export type RequestHandleReq<T = any> = {
type: strin;
typeName: string;
action: string;
data: any;
input: T;
};
export async function doRequest(req: RequestHandleReq) {
const url = req.type === "access" ? "/pi/handle/access" : "/pi/handle/plugin";
const { typeName, action, data, input } = req;
const res = await request({
url,
method: "post",
data: {
typeName,
action,
data,
input
}
});
return res;
}