Admin
2022-09-07 5890a81be95fe65622c605083b1808b6997d4417
src/api/specialWorkSystem/workApply/index.ts
@@ -3,11 +3,19 @@
export function workApplyApi() {
    return {
        // 分页获取申请列表
        getApplyListtPage: (data: object) => {
        getApplyListPage: (data: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + `/work/apply/applying/page/list`,
                method: 'post',
                data: data
            });
        },
        // 分页获取申请列表
        getAllUsers: () => {
            return request({
                url: import.meta.env.VITE_API_URL + `/account/list`,
                method: 'get'
            });
        },
@@ -100,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
            });
        }
    };
}