Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
smart-web-router
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SVI
svi-templates
smart-web-router
Commits
905fb787
Commit
905fb787
authored
Mar 16, 2020
by
陈珠河
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style: 调整进入路由时获取系统配置数据
parent
5b4d5a02
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
index.js
template/src/router/index.js
+10
-14
No files found.
template/src/router/index.js
View file @
905fb787
...
...
@@ -64,15 +64,6 @@ router.beforeEach((to, from, next) => {
}
if
(
filterRouteLogin
(
to
))
{
next
();
return
;
}
if
(
store
.
state
.
platformInfo
&&
store
.
state
.
platformInfo
.
systemId
&&
to
.
query
.
sysCode
===
from
.
query
.
sysCode
)
{
checkLogin
(
next
);
}
else
{
const
sysCode
=
to
.
query
.
sysCode
;
getSystemInfo
(
sysCode
).
then
(
_
=>
{
checkLogin
(
next
);
...
...
@@ -86,15 +77,20 @@ router.beforeEach((to, from, next) => {
}
});
}
else
{
router
.
replace
({
name
:
'Login'
,
query
:
{
sysCode
next
();
}
});
next
();
return
;
}
});
if
(
store
.
state
.
platformInfo
&&
store
.
state
.
platformInfo
.
systemId
&&
to
.
query
.
sysCode
===
from
.
query
.
sysCode
)
{
checkLogin
(
next
);
return
;
}
next
();
});
router
.
afterEach
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment