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
a32fda54
Commit
a32fda54
authored
Mar 11, 2016
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新后台回复评论时评论数不对BUG
parent
8d924e48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
forumThread.js
app/controllers/admin/forumThread.js
+12
-8
forumThread.js
app/controllers/mobile/forumThread.js
+1
-1
No files found.
app/controllers/admin/forumThread.js
View file @
a32fda54
...
...
@@ -650,9 +650,13 @@ router.get('/thread/:tid/comment/list', function(req, res, next) {
cb
(
null
,
e
);
}
else
{
forumCommentService
.
getCommentParent
(
e
.
_id
,
function
(
err
,
p_comment
)
{
var
comment
=
e
.
toObject
();
comment
.
floor
=
p_comment
.
floor
;
cb
(
null
,
comment
);
if
(
p_comment
){
var
comment
=
e
.
toObject
();
comment
.
floor
=
p_comment
.
floor
;
cb
(
null
,
comment
);
}
else
{
cb
(
null
,
e
);
}
});
}
});
...
...
@@ -920,11 +924,11 @@ router.post('/thread/comment/update/:cid/comments', function(req, res, next) {
// 获取评论的子评论列表
// 更新文章评论 + 1
forumThreadService
.
updateThreadCommentCountInc
(
tid
,
function
(
err
,
thread
)
{
if
(
err
)
{
console
.
error
(
err
);
}
});
//
forumThreadService.updateThreadCommentCountInc(tid, function(err, thread) {
//
if (err) {
//
console.error(err);
//
}
//
});
// 更新评论对象
// result.comment_count+=1; // 回复评论+1
forumCommentService
.
updateCommentById
(
cid
,
{
...
...
app/controllers/mobile/forumThread.js
View file @
a32fda54
...
...
@@ -694,7 +694,7 @@ router.post('/thread/:tid/delete', function(req, res, next) {
//文章点赞和取消点赞
router
.
post
(
'/thread/:tid/praiseOrCancelPraise'
,
function
(
req
,
res
,
next
)
{
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
var
userId
=
user
.
getMobileUser
(
req
)
;
var
mid
=
req
.
session
.
openUser
.
mid
;
var
tid
=
req
.
params
.
tid
||
null
;
var
ent_code
=
req
.
session
.
user
.
ent_code
;
...
...
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