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
769f9563
Commit
769f9563
authored
Apr 22, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change optins sort
parent
eadeb094
Pipeline
#22012
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
option.js
app/service/course/v5/option.js
+10
-10
No files found.
app/service/course/v5/option.js
View file @
769f9563
...
...
@@ -6,6 +6,10 @@ const moment = require('moment');
const
MODE
=
[
{
id
:
0
,
name
:
'全部'
,
value
:
0
,
},
{
id
:
1
,
name
:
'直播'
,
value
:
1
,
...
...
@@ -25,15 +29,15 @@ const MODE = [
id
:
5
,
name
:
'小程序'
,
value
:
5
,
},
{
id
:
0
,
name
:
'全部'
,
value
:
0
,
},
];
const
PRICE_TYPE
=
[
{
id
:
0
,
name
:
'全部'
,
value
:
0
,
},
{
id
:
1
,
name
:
'免费公益课'
,
value
:
1
,
...
...
@@ -45,10 +49,6 @@ const PRICE_TYPE = [
id
:
3
,
name
:
'正价课'
,
value
:
3
,
},
{
id
:
0
,
name
:
'全部'
,
value
:
0
,
},
];
...
...
@@ -60,13 +60,13 @@ class OptionService extends Service {
categoryList
.
forEach
(
e
=>
{
e
.
value
=
e
.
id
;
});
categoryList
.
push
({
id
:
0
,
name
:
'全部'
,
value
:
0
});
categoryList
.
unshift
({
id
:
0
,
name
:
'全部'
,
value
:
0
});
// 年龄段
const
ageList
=
await
ctx
.
classModel
.
V5
.
CourseV5Age
.
findAll
({
where
:
{
status
:
1
,
is_deleted
:
0
},
order
:
[[
'sort'
,
'asc'
]],
attributes
:
[
'id'
,
'name'
],
raw
:
true
});
ageList
.
forEach
(
e
=>
{
e
.
value
=
e
.
id
;
});
ageList
.
push
({
id
:
0
,
name
:
'全部'
,
value
:
0
});
ageList
.
unshift
({
id
:
0
,
name
:
'全部'
,
value
:
0
});
// // 课程班型
// const typeList = await ctx.classModel.V5.CourseV5Type.findAll({ where: { status: 1, is_deleted: 0 }, order: [ ['sort', 'asc'] ], attributes: [ 'id', 'name' ], raw: true });
// typeList.forEach(e => {
...
...
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