feat: add backend-mock app
This commit is contained in:
@@ -2,20 +2,20 @@ import type { UserInfo } from '@vben/types';
|
||||
|
||||
import type { UserApiType } from '../types';
|
||||
|
||||
import { get, post } from '#/forward';
|
||||
import { requestClient } from '#/forward';
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
async function userLogin(data: UserApiType.LoginParams) {
|
||||
return post<UserApiType.LoginResult>('/login', data);
|
||||
return requestClient.post<UserApiType.LoginResult>('/auth/login', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
async function getUserInfo() {
|
||||
return get<UserInfo>('/getUserInfo');
|
||||
return requestClient.get<UserInfo>('/auth/getUserInfo');
|
||||
}
|
||||
|
||||
export { getUserInfo, userLogin };
|
||||
|
@@ -10,6 +10,7 @@ namespace UserApiType {
|
||||
accessToken: string;
|
||||
desc: string;
|
||||
realName: string;
|
||||
refreshToken: string;
|
||||
userId: string;
|
||||
username: string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user