Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
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
方斌
51business
Commits
0e662e6e
Commit
0e662e6e
authored
Jun 24, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getMenuList add sort
parent
89f104a4
Pipeline
#25500
passed with stage
in 4 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
back.js
app/service/course/back.js
+2
-2
No files found.
app/service/course/back.js
View file @
0e662e6e
...
@@ -47,10 +47,10 @@ class BackService extends Service {
...
@@ -47,10 +47,10 @@ class BackService extends Service {
let
menuList
=
[];
let
menuList
=
[];
if
(
userInfo
.
is_admin
>
0
)
{
if
(
userInfo
.
is_admin
>
0
)
{
menuList
=
await
ctx
.
classModel
.
CourseBackMenu
.
findAll
({
where
:
{
is_deleted
:
0
},
attributes
:
[
'id'
,
'title'
,
'path'
,
'icon'
,
'parent_id'
],
order
:
[[
'sort'
,
'asc'
]],
raw
:
true
});
menuList
=
await
ctx
.
classModel
.
CourseBackMenu
.
findAll
({
where
:
{
is_deleted
:
0
},
attributes
:
[
'id'
,
'title'
,
'path'
,
'icon'
,
'parent_id'
,
'sort'
],
order
:
[[
'sort'
,
'asc'
]],
raw
:
true
});
}
else
{
}
else
{
const
userToMenuList
=
await
ctx
.
classModel
.
CourseBackUserToMenu
.
findAll
({
where
:
{
user_uuid
:
userUuid
,
is_deleted
:
0
}
});
const
userToMenuList
=
await
ctx
.
classModel
.
CourseBackUserToMenu
.
findAll
({
where
:
{
user_uuid
:
userUuid
,
is_deleted
:
0
}
});
menuList
=
await
ctx
.
classModel
.
CourseBackMenu
.
findAll
({
where
:
{
id
:
{
$in
:
R
.
pluck
(
'menu_id'
,
userToMenuList
)
},
is_deleted
:
0
},
attributes
:
[
'id'
,
'title'
,
'path'
,
'icon'
,
'parent_id'
],
order
:
[[
'sort'
,
'asc'
]],
raw
:
true
});
menuList
=
await
ctx
.
classModel
.
CourseBackMenu
.
findAll
({
where
:
{
id
:
{
$in
:
R
.
pluck
(
'menu_id'
,
userToMenuList
)
},
is_deleted
:
0
},
attributes
:
[
'id'
,
'title'
,
'path'
,
'icon'
,
'parent_id'
,
'sort'
],
order
:
[[
'sort'
,
'asc'
]],
raw
:
true
});
}
}
for
(
const
i
in
menuList
)
{
for
(
const
i
in
menuList
)
{
...
...
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