代码优化

This commit is contained in:
2023-03-06 11:22:43 +08:00
parent b2712087a0
commit ef78c2e42e
6 changed files with 4759 additions and 4750 deletions

View File

@@ -3,11 +3,12 @@
* @Date: 2023-03-02 14:48:35
* @LastEditors: Kane
* @FilePath: /task_schedule/src/utils/account.ts
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { type AxiosResponse } from "axios";
import { service as instance } from "./api/request";
import { API_URL } from "./api/config";
interface LoginInfo
@@ -16,15 +17,15 @@ interface LoginInfo
password: string;
}
function login(data: LoginInfo)
async function login(data: LoginInfo): Promise<AxiosResponse<any, any>>
{
return instance.request(
return await instance.request(
{
method: "post",
url: API_URL.URL_LOGIN,
data: data,
data,
}
);
}
export { LoginInfo, login };
export { type LoginInfo, login };