Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
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
徐俊
yn-science-front
Commits
83fb7f86
Commit
83fb7f86
authored
Dec 04, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
22
parent
87067e15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
index.js
src/router/index.js
+1
-3
No files found.
src/router/index.js
View file @
83fb7f86
...
@@ -295,6 +295,7 @@ export function changeProjType (type) {
...
@@ -295,6 +295,7 @@ export function changeProjType (type) {
this
.
$store
.
commit
(
'app/clearStore'
)
this
.
$store
.
commit
(
'app/clearStore'
)
setType
(
type
+
''
)
setType
(
type
+
''
)
this
.
$store
.
commit
(
'app/setProjType'
,
type
)
this
.
$store
.
commit
(
'app/setProjType'
,
type
)
let
menuList
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'menuList'
))
this
.
$store
.
commit
(
'app/initStore'
,
[
menuList
[
0
].
id
])
this
.
$store
.
commit
(
'app/initStore'
,
[
menuList
[
0
].
id
])
this
.
$router
.
push
(
'/'
)
this
.
$router
.
push
(
'/'
)
resolve
(
true
)
resolve
(
true
)
...
@@ -318,9 +319,6 @@ router.beforeEach(async (to, from, next) => {
...
@@ -318,9 +319,6 @@ router.beforeEach(async (to, from, next) => {
}
else
{
}
else
{
const
hasUser
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'user'
))
const
hasUser
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'user'
))
const
hasMenu
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'menuList'
))
const
hasMenu
=
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'menuList'
))
if
(
!!!
hasMenu
)
{
await
store
.
dispatch
(
'user/getMenuList'
)
}
if
(
hasUser
&&
hasMenu
)
{
if
(
hasUser
&&
hasMenu
)
{
if
(
to
.
path
===
'/sys'
)
{
if
(
to
.
path
===
'/sys'
)
{
if
(
!!!
hasUser
.
projType
&&
hasUser
.
type
===
'3'
&&
hasUser
.
roles
!=
'4'
)
{
if
(
!!!
hasUser
.
projType
&&
hasUser
.
type
===
'3'
&&
hasUser
.
roles
!=
'4'
)
{
...
...
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