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
8a8031d4
Commit
8a8031d4
authored
Apr 24, 2015
by
邓军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加搜索条件
parent
8eb70843
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
forumThread.js
app/controllers/admin/forumThread.js
+12
-3
No files found.
app/controllers/admin/forumThread.js
View file @
8a8031d4
...
...
@@ -226,6 +226,8 @@ router.get('/threads/list', function(req, res, next) {
var
tagId
=
req
.
query
.
tagId
;
var
pid
=
req
.
query
.
pid
;
var
content
=
req
.
query
.
content
;
var
type
=
req
.
query
.
type
;
var
status
=
req
.
query
.
status
;
var
conditions
=
{
ent_code
:
req
.
session
.
user
.
ent_code
,
level
:
1
...
...
@@ -248,17 +250,24 @@ router.get('/threads/list', function(req, res, next) {
conditions
.
content
=
{
$regex
:
content
,
$options
:
'i'
}
}
;
}
if
(
type
){
conditions
.
type
=
type
;
}
if
(
status
){
conditions
.
status
=
status
;
}
forumThreadService
.
getAllThreadByFid
(
conditions
,
pageNo
,
pageSize
,
null
,
function
(
err
,
results
)
{
if
(
err
)
{
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
if
(
results
.
items
.
length
>
0
&&
results
.
items
[
0
].
pid
)
{
forumThreadService
.
getById
(
results
.
items
[
0
].
pid
,
function
(
err
,
parentThread
)
{
if
(
pid
)
{
forumThreadService
.
getById
(
pid
,
function
(
err
,
parentThread
)
{
res
.
json
(
_
.
assign
({
parentThread
:
parentThread
},
results
,
returnCode
.
SUCCESS
));
...
...
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