2022-11-21 15:20:04 +08:00
|
|
|
import { Login } from '@/api/interface/auth';
|
2022-08-16 23:30:23 +08:00
|
|
|
import http from '@/api';
|
|
|
|
|
|
|
|
export const loginApi = (params: Login.ReqLoginForm) => {
|
|
|
|
return http.post<Login.ResLogin>(`/auth/login`, params);
|
|
|
|
};
|
|
|
|
|
2022-09-15 18:43:41 +08:00
|
|
|
export const mfaLoginApi = (params: Login.MFALoginForm) => {
|
|
|
|
return http.post<Login.ResLogin>(`/auth/mfalogin`, params);
|
|
|
|
};
|
|
|
|
|
2022-08-16 23:30:23 +08:00
|
|
|
export const getCaptcha = () => {
|
|
|
|
return http.get<Login.ResCaptcha>(`/auth/captcha`);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const logOutApi = () => {
|
|
|
|
return http.post<any>(`/auth/logout`);
|
|
|
|
};
|
2022-09-15 17:15:03 +08:00
|
|
|
|
2023-04-14 18:54:34 +08:00
|
|
|
export const checkIsSafety = (code: string) => {
|
|
|
|
return http.get<boolean>(`/auth/issafety?code=${code}`);
|
2022-11-21 15:20:04 +08:00
|
|
|
};
|
2023-03-14 15:03:46 +08:00
|
|
|
|
|
|
|
export const checkIsDemo = () => {
|
|
|
|
return http.get<boolean>('/auth/demo');
|
|
|
|
};
|