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
91189242
Commit
91189242
authored
May 08, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
categoryList add parent_name
parent
ae520181
Pipeline
#22894
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
option.js
app/service/course/v5/option.js
+3
-0
No files found.
app/service/course/v5/option.js
View file @
91189242
...
...
@@ -134,6 +134,8 @@ class OptionService extends Service {
}
const
categoryList
=
await
ctx
.
classModel
.
V5
.
CourseV5Category
.
findAll
(
filter
);
let
categoryAll
=
await
ctx
.
classModel
.
V5
.
CourseV5Category
.
findAll
({
where
:
{},
attributes
:
[
'id'
,
'name'
],
raw
:
true
});
categoryAll
=
_
.
groupBy
(
categoryAll
,
'id'
);
const
filterIds
=
[];
// 智能选课要判断年龄
...
...
@@ -167,6 +169,7 @@ class OptionService extends Service {
id
:
v
.
id
,
type
:
v
.
type
,
parent_id
:
v
.
parent_id
,
parent_name
:
v
.
parent_id
>
0
?
(
ctx
.
isEmpty
(
categoryAll
[
v
.
parent_id
])
?
''
:
categoryAll
[
v
.
parent_id
][
0
].
name
)
:
''
,
name
:
v
.
name
,
selected_icon
:
v
.
selected_icon
,
unselected_icon
:
v
.
unselected_icon
,
...
...
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