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
b03374e4
Commit
b03374e4
authored
Dec 20, 2019
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix collect
parent
74c73717
Pipeline
#18459
passed with stage
in 54 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
institution.js
app/service/course/v3/institution.js
+3
-3
No files found.
app/service/course/v3/institution.js
View file @
b03374e4
...
...
@@ -126,7 +126,7 @@ class InstitutionSubService extends Service {
areas
=
_
.
orderBy
(
areas
,
[
'distance'
],
[
'asc'
]);
// 是否已收藏
const
userCollect
=
await
ctx
.
classModel
.
V3
.
CourseUserCollection
.
findOne
({
where
:
{
institution_id
,
user_uuid
:
userUuid
,
is_deleted
:
0
}
});
const
userCollect
=
await
ctx
.
classModel
.
V3
.
CourseUserCollection
.
findOne
({
where
:
{
type
:
1
,
type_id
:
institution_id
,
user_uuid
:
userUuid
,
is_deleted
:
0
}
});
// 获取所有标签
const
allTags
=
await
ctx
.
classModel
.
V3
.
CourseTag
.
findAll
({
where
:
{
status
:
'online'
,
is_deleted
:
0
}
});
...
...
@@ -307,8 +307,8 @@ class InstitutionSubService extends Service {
}
// 用户已收藏机构列表
const
userInstitutions
=
await
ctx
.
classModel
.
V3
.
CourseUserCollection
.
findAll
({
where
:
{
is_deleted
:
0
,
user_uuid
:
userUuid
}
});
const
userInstitutionIds
=
R
.
pluck
(
'
institution
_id'
,
userInstitutions
);
const
userInstitutions
=
await
ctx
.
classModel
.
V3
.
CourseUserCollection
.
findAll
({
where
:
{
type
:
1
,
is_deleted
:
0
,
user_uuid
:
userUuid
}
});
const
userInstitutionIds
=
R
.
pluck
(
'
type
_id'
,
userInstitutions
);
// 机构图片及格式化
for
(
const
i
in
institutionList
)
{
...
...
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