refactor: 【web-ant】重构认证模块并移除未使用的组件和功能【0fed9472】

This commit is contained in:
YunaiV
2025-03-26 08:39:07 +08:00
parent c881a47ffd
commit ea4892a5f6
4 changed files with 21 additions and 19 deletions

View File

@@ -17,12 +17,6 @@ export namespace AuthApi {
expiresTime: number;
}
/** 刷新 token 返回值 */
export interface RefreshTokenResult {
data: string;
status: number;
}
/** 租户信息返回值 */
export interface TenantResult {
id: number;
@@ -49,14 +43,12 @@ export async function loginApi(data: AuthApi.LoginParams) {
}
/** 刷新 accessToken */
export async function refreshTokenApi() {
// TODO @芋艿refreshToken 传递
return baseRequestClient.post<AuthApi.RefreshTokenResult>('/system/auth/refresh', {
withCredentials: true,
});
export async function refreshTokenApi(refreshToken: string) {
return baseRequestClient.post(`/system/auth/refresh-token?refreshToken=${refreshToken}`);
}
/** 退出登录 */
// TODO @芋艿:有问题 baseRequestClient
export async function logoutApi() {
return baseRequestClient.post('/system/auth/logout', {
withCredentials: true,