mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 登录重定向地址相关重构
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import type { Component } from 'vue';
|
||||
import { EnumRoutePath } from '@/enum';
|
||||
import type { RoutePathKey } from '@/interface';
|
||||
import { router } from '@/router';
|
||||
|
||||
/** 获取路由name map */
|
||||
export function getRouteNameMap() {
|
||||
@ -13,3 +14,9 @@ export function setRouterCacheName(component: Component, name?: string) {
|
||||
Object.assign(component, { name });
|
||||
}
|
||||
}
|
||||
|
||||
export function getLoginRedirectUrl() {
|
||||
const path = router.currentRoute.value.fullPath as EnumRoutePath;
|
||||
const redirectUrl = path === EnumRoutePath.root ? undefined : path;
|
||||
return redirectUrl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user