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
60c8e79c
Commit
60c8e79c
authored
Mar 31, 2016
by
陈家荣
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sort
parent
96411480
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
forumThread.js
app/controllers/admin/forumThread.js
+10
-11
No files found.
app/controllers/admin/forumThread.js
View file @
60c8e79c
...
...
@@ -403,10 +403,7 @@ router.get('/threads/list', function(req, res, next) {
var
title
=
req
.
query
.
title
;
var
sortBy
=
{
top
:
-
1
,
// top_order_idx:-1,
topTime
:
-
1
,
tag_top
:
-
1
,
tag_topTime
:
-
1
,
quality
:
-
1
,
created
:
-
1
};
...
...
@@ -424,6 +421,12 @@ router.get('/threads/list', function(req, res, next) {
conditions
.
tag
=
{
$in
:
[
tagId
]
};
sortBy
=
{
top
:
-
1
,
topTime
:
-
1
,
quality
:
-
1
,
created
:
-
1
}
}
if
(
pid
)
{
conditions
.
pid
=
pid
;
...
...
@@ -451,20 +454,16 @@ router.get('/threads/list', function(req, res, next) {
if
(
recommend_threads
){
//推荐贴
conditions
.
new_recommend
=
1
;
sortBy
=
{
new_recommend
:
-
1
,
new_recommend_order_idx
:
-
1
,
new_recommend_time
:
-
1
,
top
:
-
1
,
// top_order_idx:-1,
topTime
:
-
1
,
tag_top
:
-
1
,
tag_topTime
:
-
1
,
quality
:
-
1
,
created
:
-
1
};
}
if
(
top_threads
){
//置顶帖
conditions
.
top
=
1
;
sortBy
=
{
top_order_idx
:
-
1
,
created
:
-
1
};
}
if
(
eventStatus
)
{
...
...
strong
@strong
mentioned in commit
41eff4d8
·
Mar 31, 2016
mentioned in commit
41eff4d8
mentioned in commit 41eff4d885cb923c8f2d59000ccf4ae100a5ca6d
Toggle commit list
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