From 309b5a2eb4a99f20b2dcceca41c7ed1275bcc6ae Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期二, 22 七月 2025 17:26:08 +0800 Subject: [PATCH] '注册导航上传loading' --- src/api/upload/index.ts | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/api/upload/index.ts b/src/api/upload/index.ts index 004e73c..de0fae2 100644 --- a/src/api/upload/index.ts +++ b/src/api/upload/index.ts @@ -2,25 +2,22 @@ * 锛堜笉寤鸿鍐欐垚 request.post(xxx)锛屽洜涓鸿繖鏍� post 鏃讹紝鏃犳硶 params 涓� data 鍚屾椂浼犲弬锛� * * 涓婁紶api鎺ュ彛闆嗗悎 - * @method register 娉ㄥ唽 - * @method captcha 鑾峰彇楠岃瘉鐮� */ import { http } from "@/utils/http"; import { baseUrlApi } from "../util"; -type Result = { - success: boolean; - data: Array<any>; -}; +import type { Result } from "../types"; //涓婁紶鍜岃瘑鍒惀涓氭墽鐓� export const upBizLicense = (data?: object) => { - return http.request("post", baseUrlApi("/api/upFile/upBizLicense"), { data }); + return http.request<Result>("post", baseUrlApi("/api/upFile/upBizLicense"), { + data + }); }; // 涓婁紶韬唤璇� export const uploadIdCord = (params?: object) => { - return http.request("post", baseUrlApi("/api/upFile/uploadIdCord"), { + return http.request<Result>("post", baseUrlApi("/api/upFile/uploadIdCord"), { params }); }; -- Gitblit v1.9.1