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
51aa12a5
Commit
51aa12a5
authored
Aug 27, 2015
by
黄广星
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
717640fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
forumNotice.js
app/controllers/mobile/forumNotice.js
+4
-3
No files found.
app/controllers/mobile/forumNotice.js
View file @
51aa12a5
...
...
@@ -94,7 +94,7 @@ router.get('/notice/newestMsg', function(req, res, next) {
pageSize
=
req
.
query
.
pageSize
,
plate
=
req
.
query
.
plate
;
var
_condition
=
{
status
:
1
,
type
:
2
,
ent_code
:
req
.
session
.
openU
ser
.
ent_code
},
_sort
=
{
top
:
-
1
,
createtime
:
-
1
};
var
_condition
=
{
status
:
1
,
type
:
2
,
ent_code
:
req
.
session
.
u
ser
.
ent_code
},
_sort
=
{
top
:
-
1
,
createtime
:
-
1
};
if
(
plate
){
_condition
.
$or
=
[{
plate
:
plate
},{
plate
:
null
}];
}
else
{
...
...
@@ -125,7 +125,7 @@ router.get('/notice/newestAct', function(req, res, next) {
var
curdate
=
new
Date
(),
_condition
=
{
status
:
1
,
finished
:
0
,
type
:
1
,
,
ent_code
:
req
.
session
.
openU
ser
.
ent_code
,
ent_code
:
req
.
session
.
u
ser
.
ent_code
,
startdate
:{
$lte
:
curdate
},
indate
:{
$gte
:
curdate
},
},
_sort
=
{
top
:
-
1
,
startdate
:
-
1
};
...
...
@@ -134,6 +134,7 @@ router.get('/notice/newestAct', function(req, res, next) {
}
else
{
_condition
.
plate
=
null
;
}
console
.
log
(
_condition
);
queryList
(
_condition
,
_sort
,
pageNo
,
pageSize
,
function
(
err
,
result
){
if
(
err
){
return
res
.
json
(
err
);
...
...
@@ -156,7 +157,7 @@ router.get('/notice/oldAct', function(req, res, next) {
pageSize
=
req
.
query
.
pageSize
,
plate
=
req
.
query
.
plate
,
curdate
=
new
Date
(),
_condition
=
{
status
:
1
,
type
:
1
,
ent_code
:
req
.
session
.
openU
ser
.
ent_code
,
$or
:[{
indate
:{
$lt
:
curdate
}},{
finished
:
1
}]},
_condition
=
{
status
:
1
,
type
:
1
,
ent_code
:
req
.
session
.
u
ser
.
ent_code
,
$or
:[{
indate
:{
$lt
:
curdate
}},{
finished
:
1
}]},
_sort
=
{
top
:
-
1
,
indate
:
-
1
};
if
(
plate
){
_condition
.
$or
=
[{
plate
:
plate
},{
plate
:
null
}];
...
...
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