mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 细节完善、迁移页面
This commit is contained in:
@ -18,8 +18,8 @@ export async function handlePagePermission(
|
||||
const needLogin = Boolean(to.meta?.requiresAuth) || Boolean(permissions.length);
|
||||
const hasPermission = !permissions.length || permissions.includes(auth.userInfo.userRole);
|
||||
|
||||
// 初始化动态路由
|
||||
if (!route.isAddedDynamicRoute) {
|
||||
// 添加动态路由
|
||||
await route.initDynamicRoute(router);
|
||||
|
||||
if (to.name === routeName('not-found-page')) {
|
||||
@ -35,6 +35,13 @@ export async function handlePagePermission(
|
||||
return;
|
||||
}
|
||||
|
||||
// 外链路由, 从新标签打开,返回上一个路由
|
||||
if (to.meta.href) {
|
||||
window.open(to.meta.href);
|
||||
next({ path: from.fullPath, replace: true, query: from.query });
|
||||
return;
|
||||
}
|
||||
|
||||
const actions: Common.StrategyAction[] = [
|
||||
// 已登录状态跳转登录页,跳转至首页
|
||||
[
|
||||
|
Reference in New Issue
Block a user