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
74d5b92d
Commit
74d5b92d
authored
Dec 11, 2015
by
chrysan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【接口】填坑+列表屏蔽删除
parent
3182ed43
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
forumThread.js
app/controllers/admin/forumThread.js
+12
-6
No files found.
app/controllers/admin/forumThread.js
View file @
74d5b92d
...
@@ -496,9 +496,9 @@ router.get('/thread/:tid/comment/list', function(req, res, next) {
...
@@ -496,9 +496,9 @@ router.get('/thread/:tid/comment/list', function(req, res, next) {
ent_code
:
req
.
session
.
user
.
ent_code
,
ent_code
:
req
.
session
.
user
.
ent_code
,
thread
:
tid
,
thread
:
tid
,
// level: '1',
// level: '1',
//
status: {
status
:
{
//
$ne: 2
$ne
:
2
//
} //过滤被删除的数据,status 为 2 表示删除
}
//过滤被删除的数据,status 为 2 表示删除
};
};
if
(
content
)
{
if
(
content
)
{
conditions
.
content
=
{
conditions
.
content
=
{
...
@@ -547,7 +547,10 @@ router.get('/thread/:tid/comment/list/:floor', function(req, res, next) {
...
@@ -547,7 +547,10 @@ router.get('/thread/:tid/comment/list/:floor', function(req, res, next) {
ent_code
:
req
.
session
.
user
.
ent_code
,
ent_code
:
req
.
session
.
user
.
ent_code
,
thread
:
tid
,
thread
:
tid
,
level
:
'1'
,
level
:
'1'
,
floor
:
floor
floor
:
floor
,
status
:
{
$ne
:
2
}
//过滤被删除的数据,status 为 2 表示删除
};
};
if
(
tid
&&
floor
)
{
if
(
tid
&&
floor
)
{
...
@@ -592,7 +595,10 @@ router.get('/thread/:tid/comment/list/member/:mid', function(req, res, next) {
...
@@ -592,7 +595,10 @@ router.get('/thread/:tid/comment/list/member/:mid', function(req, res, next) {
pageSize
=
req
.
query
.
pageSize
||
10
;
pageSize
=
req
.
query
.
pageSize
||
10
;
var
conditions
=
{
var
conditions
=
{
ent_code
:
req
.
session
.
user
.
ent_code
,
ent_code
:
req
.
session
.
user
.
ent_code
,
thread
:
tid
thread
:
tid
,
status
:
{
$ne
:
2
}
//过滤被删除的数据,status 为 2 表示删除
};
};
if
(
content
)
{
if
(
content
)
{
conditions
.
content
=
{
conditions
.
content
=
{
...
@@ -635,7 +641,7 @@ router.post('/thread/comment/update/:cid', function(req, res, next) {
...
@@ -635,7 +641,7 @@ router.post('/thread/comment/update/:cid', function(req, res, next) {
if
(
status
==
2
)
{
if
(
status
==
2
)
{
//一级评论
//一级评论
if
(
comment
.
level
==
1
)
{
if
(
comment
.
level
==
1
)
{
var
commentList
=
resul
t
.
comments
;
var
commentList
=
commen
t
.
comments
;
var
comments
=
forumThreadService
.
remove
(
commentList
,
cid
);
var
comments
=
forumThreadService
.
remove
(
commentList
,
cid
);
forumThreadService
.
updateThreadById
(
comment
.
thread
,
{
forumThreadService
.
updateThreadById
(
comment
.
thread
,
{
comments
:
comments
,
comments
:
comments
,
...
...
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