Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdsf-static-bg
Project
Overview
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
姜雷
cdsf-static-bg
Commits
d04b925a
Commit
d04b925a
authored
Oct 11, 2018
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取路由路径
parent
08ebb887
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
index.js
src/store/modules/user/index.js
+11
-1
No files found.
src/store/modules/user/index.js
View file @
d04b925a
...
@@ -32,7 +32,17 @@ const actions = {
...
@@ -32,7 +32,17 @@ const actions = {
}
}
commit
(
UPDATE_USERINFO
,
admin
);
commit
(
UPDATE_USERINFO
,
admin
);
dispatch
(
'initRoute'
,
menu
).
then
(()
=>
{
dispatch
(
'initRoute'
,
menu
).
then
(()
=>
{
resolve
();
let
path
=
'/'
;
if
(
menu
.
length
)
{
path
+=
menu
[
0
].
menuUrl
;
if
(
menu
[
0
].
childList
&&
menu
[
0
].
childList
.
length
)
{
path
=
path
.
lastIndexOf
(
'/'
)
===
path
.
length
-
1
?
path
+
menu
[
0
].
childList
[
0
].
menuUrl
:
path
+
'/'
+
menu
[
0
].
childList
[
0
].
menuUrl
;
}
}
resolve
(
path
);
});
});
})
})
.
catch
(
error
=>
{
.
catch
(
error
=>
{
...
...
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