Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
T
topology
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
姜立玮
topology
Commits
9f5ed82c
提交
9f5ed82c
authored
5 年前
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
动态加载路由 页面刷新问题
上级
b7002448
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
25 行增加
和
2 行删除
+25
-2
index.js
ruoyi-ui/src/router/index.js
+12
-2
permission.js
ruoyi-ui/src/store/modules/permission.js
+1
-0
redirect.vue
ruoyi-ui/src/views/redirect.vue
+12
-0
没有找到文件。
ruoyi-ui/src/router/index.js
浏览文件 @
9f5ed82c
...
@@ -26,6 +26,17 @@ import Layout from '@/layout'
...
@@ -26,6 +26,17 @@ import Layout from '@/layout'
// 公共路由
// 公共路由
export
const
constantRoutes
=
[
export
const
constantRoutes
=
[
{
path
:
'/redirect'
,
component
:
Layout
,
hidden
:
true
,
children
:
[
{
path
:
'/redirect/:path*'
,
component
:
()
=>
import
(
'@/views/redirect'
)
}
]
},
{
{
path
:
'/login'
,
path
:
'/login'
,
component
:
()
=>
import
(
'@/views/login'
),
component
:
()
=>
import
(
'@/views/login'
),
...
@@ -93,8 +104,7 @@ export const constantRoutes = [
...
@@ -93,8 +104,7 @@ export const constantRoutes = [
meta
:
{
title
:
'修改生成配置'
}
meta
:
{
title
:
'修改生成配置'
}
}
}
]
]
},
}
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
}
]
]
export
default
new
Router
({
export
default
new
Router
({
...
...
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/store/modules/permission.js
浏览文件 @
9f5ed82c
...
@@ -20,6 +20,7 @@ const permission = {
...
@@ -20,6 +20,7 @@ const permission = {
// 向后端请求路由数据
// 向后端请求路由数据
getRouters
().
then
(
res
=>
{
getRouters
().
then
(
res
=>
{
const
accessedRoutes
=
filterAsyncRouter
(
res
.
data
)
const
accessedRoutes
=
filterAsyncRouter
(
res
.
data
)
accessedRoutes
.
push
({
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
})
commit
(
'SET_ROUTES'
,
accessedRoutes
)
commit
(
'SET_ROUTES'
,
accessedRoutes
)
resolve
(
accessedRoutes
)
resolve
(
accessedRoutes
)
})
})
...
...
This diff is collapsed.
Click to expand it.
ruoyi-ui/src/views/redirect.vue
0 → 100644
浏览文件 @
9f5ed82c
<
script
>
export
default
{
created
()
{
const
{
params
,
query
}
=
this
.
$route
const
{
path
}
=
params
this
.
$router
.
replace
({
path
:
'/'
+
path
,
query
})
},
render
:
function
(
h
)
{
return
h
()
// avoid warning message
}
}
</
script
>
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论