mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-12-16 07:10:34 +08:00
feat: 新增token过期 跳出提示框 并跳转登录页的逻辑
This commit is contained in:
@@ -36,7 +36,7 @@ export type TokenDTO = {
|
||||
};
|
||||
|
||||
export type CurrentLoginUserDTO = {
|
||||
user: any;
|
||||
userInfo: any;
|
||||
roleKey: string;
|
||||
permissions: Set<string>;
|
||||
};
|
||||
@@ -61,3 +61,8 @@ export const getCaptchaCode = () => {
|
||||
export const loginByPassword = (data: LoginByPasswordDTO) => {
|
||||
return http.request<ResponseData<TokenDTO>>("post", "/login", { data });
|
||||
};
|
||||
|
||||
/** 获取当前登录用户接口 */
|
||||
export const getLoginUserInfo = () => {
|
||||
return http.request<ResponseData<TokenDTO>>("get", "/getLoginUserInfo");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user