Explorar el Código

智能柜项目提交

skyline hace 2 meses
padre
commit
23a4581f73
Se han modificado 2 ficheros con 15 adiciones y 0 borrados
  1. 3 0
      .gitignore
  2. 12 0
      haha-admin-web/src/api/mock.ts

+ 3 - 0
.gitignore

@@ -46,3 +46,6 @@ tests/**/coverage/
 *.njsproj
 *.sln
 tsconfig.tsbuildinfo
+
+# 强制包含被全局 gitignore 排除的目录
+!haha-admin-web/src/views/inventory/logs/

+ 12 - 0
haha-admin-web/src/api/mock.ts

@@ -0,0 +1,12 @@
+import { http } from "@/utils/http";
+
+export type UploadResult = {
+  success: boolean;
+  data: {
+    url: string;
+  };
+};
+
+export const formUpload = (data: FormData): Promise<UploadResult> => {
+  return http.request("post", "/upload", { data });
+};