From b523f8426c3ba2e4fcac3c196b5bef2af455c0c2 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期五, 26 八月 2022 12:43:13 +0800
Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/gtqt

---
 src/api/specialWorkSystem/workApply/index.ts |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/api/specialWorkSystem/workApply/index.ts b/src/api/specialWorkSystem/workApply/index.ts
index 1df392e..890b524 100644
--- a/src/api/specialWorkSystem/workApply/index.ts
+++ b/src/api/specialWorkSystem/workApply/index.ts
@@ -108,5 +108,35 @@
                 data: data
             });
         },
+
+        // 获取图片上传路径
+        getUploadUrl: (name: string) => {
+            return request({
+                url: import.meta.env.VITE_API_URL + `/specialWork/file/getPresignUrl`,
+                method: 'post',
+                data: { prefixName: name.split('.')[0], suffixName: name.split('.')[1] }
+            });
+        },
+
+        // 上传图片
+        uploadFile: (path: string, file: any) => {
+            return request({
+                headers: {
+                    contentType: 'application/json;charset=UTF-8'
+                },
+                url: path,
+                method: 'put',
+                data: file
+            });
+        },
+
+        // 删除图片
+        deleteFile: (data: object) => {
+            return request({
+                url: import.meta.env.VITE_API_URL + `/specialWork/file/deleteFile`,
+                method: 'post',
+                data: data
+            });
+        }
     };
 }

--
Gitblit v1.9.2