mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-29 23:13:24 +08:00
refactor: 将跳转放到最后
This commit is contained in:
@@ -89,21 +89,21 @@ export const useAuthStore = defineStore('auth', () => {
|
|||||||
|
|
||||||
resetAllStores();
|
resetAllStores();
|
||||||
accessStore.setLoginExpired(false);
|
accessStore.setLoginExpired(false);
|
||||||
|
|
||||||
// 回登录页带上当前路由地址
|
|
||||||
await router.replace({
|
|
||||||
path: LOGIN_PATH,
|
|
||||||
query: redirect
|
|
||||||
? {
|
|
||||||
redirect: encodeURIComponent(router.currentRoute.value.fullPath),
|
|
||||||
}
|
|
||||||
: {},
|
|
||||||
});
|
|
||||||
} catch {
|
} catch {
|
||||||
// 不做任何处理
|
// 不做任何处理
|
||||||
} finally {
|
} finally {
|
||||||
isLoggingOut.value = false; // 重置 标识
|
isLoggingOut.value = false; // 重置 标识
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 回登录页带上当前路由地址
|
||||||
|
await router.replace({
|
||||||
|
path: LOGIN_PATH,
|
||||||
|
query: redirect
|
||||||
|
? {
|
||||||
|
redirect: encodeURIComponent(router.currentRoute.value.fullPath),
|
||||||
|
}
|
||||||
|
: {},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchUserInfo() {
|
async function fetchUserInfo() {
|
||||||
|
|||||||
Reference in New Issue
Block a user