vue-vben-admin/apps/web-antd/src/apis/modules/user.ts

22 lines
448 B
TypeScript
Raw Normal View History

2024-06-02 20:47:50 +08:00
import type { UserInfo } from '@vben/types';
import type { UserApiType } from '../types';
2024-06-08 19:49:06 +08:00
2024-06-30 14:09:44 +08:00
import { requestClient } from '#/forward';
2024-06-02 20:47:50 +08:00
/**
*
*/
async function userLogin(data: UserApiType.LoginParams) {
2024-06-30 14:09:44 +08:00
return requestClient.post<UserApiType.LoginResult>('/auth/login', data);
2024-06-02 20:47:50 +08:00
}
/**
*
*/
async function getUserInfo() {
2024-06-30 14:09:44 +08:00
return requestClient.get<UserInfo>('/auth/getUserInfo');
2024-06-02 20:47:50 +08:00
}
export { getUserInfo, userLogin };