http封装

This commit is contained in:
none
2023-03-02 10:51:30 +08:00
parent ad62f872ca
commit 0b02637708
10 changed files with 170 additions and 24 deletions

19
src/api/login.ts Normal file
View File

@@ -0,0 +1,19 @@
import client from "./internal/httpClient";
export function login(
email: string,
password: string,
captchaKey: string,
captchaVal: string
) {
return client.post("/backend/v1/auth/login", {
email: email,
password: password,
captcha_key: captchaKey,
captcha_val: captchaVal,
});
}
export function logout() {
return client.post("/backend/v1/auth/logout", {});
}