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
fcb4a018
Commit
fcb4a018
authored
Mar 11, 2016
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
b297a896
' into SANDBOX
parents
3ed356ae
b297a896
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
forumThread.js
app/controllers/admin/forumThread.js
+3
-10
forumComment.js
app/models/forumComment.js
+4
-0
No files found.
app/controllers/admin/forumThread.js
View file @
fcb4a018
...
...
@@ -654,15 +654,9 @@ router.get('/thread/:tid/comment/list', function(req, res, next) {
comment
.
floor
=
p_comment
.
floor
;
cb
(
null
,
comment
);
}
else
if
(
p_comment
&&
!
p_comment
.
floor
){
//上一级没有楼层就再查上一级的评论
forumCommentService
.
getCommentParent
(
new
mongoose
.
Types
.
ObjectId
(
p_comment
.
_id
),
function
(
err
,
p_p_comment
)
{
if
(
p_comment
){
var
comment
=
e
.
toObject
();
comment
.
floor
=
p_p_comment
.
floor
;
cb
(
null
,
comment
);
}
else
{
cb
(
null
,
e
);
}
});
var
comment
=
e
.
toObject
();
comment
.
floor
=
comment
.
oneCommentFloor
;
cb
(
null
,
comment
);
}
else
{
cb
(
null
,
e
);
}
...
...
@@ -1020,7 +1014,6 @@ router.post('/thread/comment/add', function(req, res, next) {
if
(
err
)
{
callback
(
err
);
}
else
{
forumThreadService
.
getById
(
tid
,
function
(
err
,
thread
)
{
if
(
entity
.
level
==
1
)
{
forumAboutMEService
.
saveCommentLevel1
(
thread
,
comment
);
...
...
app/models/forumComment.js
View file @
fcb4a018
...
...
@@ -63,6 +63,10 @@ var ForumCommentSchema = new Schema({
floor
:
{
//评论楼层
type
:
Number
,
require
:
false
},
oneCommentFloor
:{
//一级评论楼层
type
:
Number
,
require
:
false
}
},
{
'collection'
:
'pisns_forum_comment'
...
...
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