perf: 优化接口类型

This commit is contained in:
xiaoxian521
2022-08-18 18:35:09 +08:00
parent d6a329a63c
commit a983575b6d
7 changed files with 37 additions and 28 deletions

View File

@@ -1,14 +1,14 @@
import { http } from "../utils/http";
interface userType extends Promise<any> {
type Result = {
svg?: string;
code?: number;
info?: object;
}
};
// 获取验证码
export const getVerify = (): userType => {
return http.request("get", "/captcha");
export const getVerify = () => {
return http.request<Result>("get", "/captcha");
};
// 登录