chore: init project
This commit is contained in:
23
apps/antd-view/src/services/modules/user/index.ts
Normal file
23
apps/antd-view/src/services/modules/user/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { UserInfo } from '@vben-core/typings';
|
||||
|
||||
import { request } from '@/services/request';
|
||||
|
||||
import type { UserApi } from './typing';
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
async function userLogin(data: UserApi.LoginParams) {
|
||||
return request<UserApi.LoginResult>('/login', { data, method: 'post' });
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
async function getUserInfo() {
|
||||
return request<UserInfo>('/getUserInfo', { method: 'get' });
|
||||
}
|
||||
|
||||
export { getUserInfo, userLogin };
|
||||
|
||||
export type { UserApi } from './typing';
|
Reference in New Issue
Block a user