mirror of
https://github.com/PlayEdu/backend
synced 2025-12-26 12:11:05 +08:00
http封装
This commit is contained in:
19
src/api/login.ts
Normal file
19
src/api/login.ts
Normal 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", {});
|
||||
}
|
||||
Reference in New Issue
Block a user