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,6 @@
|
||||
import type { Router, RouteLocationNormalized, NavigationGuardNext } from 'vue-router';
|
||||
import { useTitle } from '@vueuse/core';
|
||||
import { getToken } from '@/utils';
|
||||
import { getToken, getLoginRedirectUrl } from '@/utils';
|
||||
import { RouteNameMap } from '../helpers';
|
||||
|
||||
/**
|
||||
@ -46,7 +46,7 @@ function handleRouterAction(to: RouteLocationNormalized, from: RouteLocationNorm
|
||||
[
|
||||
!isLogin && needLogin,
|
||||
() => {
|
||||
const redirectUrl = window.location.href;
|
||||
const redirectUrl = getLoginRedirectUrl();
|
||||
next({ name: RouteNameMap.get('login'), query: { redirectUrl } });
|
||||
}
|
||||
],
|
||||
|
Reference in New Issue
Block a user