Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
d33c609a
Commit
d33c609a
authored
Mar 03, 2016
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的消息增加头衔回复
parent
4a8f4085
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
forumAboutMe.js
app/controllers/mobile/forumAboutMe.js
+17
-0
forumAboutMEService.js
app/service/forumAboutMEService.js
+4
-1
No files found.
app/controllers/mobile/forumAboutMe.js
View file @
d33c609a
...
...
@@ -41,6 +41,23 @@ router.get('/aboutme/other2me', function(req, res, next) {
if
(
err
)
{
res
.
json
(
returnCode
.
UNCHECK_ERROR
(
err
));
}
else
{
_
.
forEach
(
results
.
items
,
function
(
d
,
i
)
{
if
(
results
.
items
[
i
].
toObject
)
{
results
.
items
[
i
]
=
results
.
items
[
i
].
toObject
();
}
//获取等级最高的荣誉
if
(
results
.
items
[
i
].
from
&&
results
.
items
[
i
].
from
.
honorTitles
&&
results
.
items
[
i
].
from
.
honorTitles
.
length
>
0
){
var
temp_honorTitles
=
_
.
sortBy
(
results
.
items
[
i
].
from
.
honorTitles
,
'order_idx'
)
for
(
var
m
=
temp_honorTitles
.
length
-
1
;
m
>=
0
;
m
-=
1
){
var
honor
=
temp_honorTitles
[
m
]
if
(
honor
.
is_show
==
1
){
results
.
items
[
i
].
from
.
honorTitles
=
honor
;
break
;
}
}
}
});
util
.
loadLevel
(
req
.
session
.
user
.
ent_code
,
results
.
items
,
function
(){
res
.
json
(
_
.
assign
(
results
,
returnCode
.
SUCCESS
));
});
...
...
app/service/forumAboutMEService.js
View file @
d33c609a
...
...
@@ -441,7 +441,10 @@ exports.other2me=function(ent_code,id,pageNo,pageSize,callback){
var
sortBy
=
'-created'
;
ForumAboutMe
.
find
(
condition
).
populate
({
path
:
'from to commentLevel1From commentLevel2ThreadFrom'
,
select
:
'uid nickName icon displayName displayIcon classLevel'
select
:
'uid nickName icon displayName displayIcon classLevel honorTitles'
,
options
:
{
populate
:
"honorTitles"
//继续查荣誉
}
}).
populate
({
path
:
'thread'
,
select
:
'-title -topTime -tag_topTime -tag -comments -created'
...
...
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