Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
f43e17b6
Commit
f43e17b6
authored
Nov 01, 2022
by
张俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apaas菜单
parent
a54c7392
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/components/login-by-account.vue
src/components/login-by-account.vue
+3
-3
src/main.js
src/main.js
+3
-3
No files found.
src/components/login-by-account.vue
View file @
f43e17b6
...
...
@@ -138,11 +138,11 @@ export default {
getUserInfo
()
{
return
this
.
$axios
.
get
(
`/apaas/system/v5/user/getUserInfo`
);
},
getMenu
()
{
return
this
.
$axios
.
get
(
`/apaas/system/v5/menu/user/tree`
);
getMenu
(
search
)
{
return
this
.
$axios
.
get
(
`/apaas/system/v5/menu/user/tree
?search=
${
search
}
`
);
},
getUser
()
{
Promise
.
all
([
this
.
getUserInfo
(),
this
.
getMenu
()]).
then
((
res
)
=>
{
Promise
.
all
([
this
.
getUserInfo
(),
this
.
getMenu
(
'
apaas
'
)]).
then
((
res
)
=>
{
if
(
res
[
0
].
data
.
code
==
200
&&
res
[
1
].
data
.
code
==
200
)
{
let
data
=
res
[
1
].
data
.
data
[
0
].
children
||
[];
this
.
$store
.
commit
(
"
setUserInfo
"
,
res
[
0
].
data
.
data
);
...
...
src/main.js
View file @
f43e17b6
...
...
@@ -44,8 +44,8 @@ function getUser() {
}
//获取用户菜单信息
function
getMenu
()
{
return
axios
.
get
(
`/apaas/system/v5/menu/user/tree`
)
function
getMenu
(
search
)
{
return
axios
.
get
(
`/apaas/system/v5/menu/user/tree
?search=
${
search
}
`
)
}
//处理菜单成为对象
...
...
@@ -60,7 +60,7 @@ function getMenuObj(menu,parentRowPath,menuObj){
}
Promise
.
all
([
getUser
(),
getMenu
()]).
then
(
res
=>
{
Promise
.
all
([
getUser
(),
getMenu
(
'
apaas
'
)]).
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
[
0
].
data
.
code
==
200
&&
res
[
1
].
data
.
code
==
200
)
{
//已登录则记录菜单和用户信息
...
...
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