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
941423a0
Commit
941423a0
authored
Mar 16, 2016
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
07b5828e
'
parents
14e9e276
07b5828e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
59 deletions
+127
-59
forumThread.js
app/controllers/mobile/forumThread.js
+111
-56
forumModeratorApplyService.js
app/service/forumModeratorApplyService.js
+12
-0
forumThreadService.js
app/service/forumThreadService.js
+4
-3
No files found.
app/controllers/mobile/forumThread.js
View file @
941423a0
This diff is collapsed.
Click to expand it.
app/service/forumModeratorApplyService.js
View file @
941423a0
...
@@ -112,4 +112,16 @@ exports.getForumModeratorApplys = function(conditions, pageNo, pageSize, sort, c
...
@@ -112,4 +112,16 @@ exports.getForumModeratorApplys = function(conditions, pageNo, pageSize, sort, c
});
});
};
};
//获取条件获取
exports
.
getForumModeratorApplyByConditions
=
function
(
conditions
,
callback
)
{
forumModeratorApply
.
findOne
(
conditions
,
function
(
err
,
doc
)
{
if
(
err
)
{
console
.
error
(
err
);
callback
(
err
,
null
);
}
else
{
callback
(
null
,
doc
);
}
});
};
app/service/forumThreadService.js
View file @
941423a0
...
@@ -248,8 +248,8 @@ exports.createThread = function(entity, callback) {
...
@@ -248,8 +248,8 @@ exports.createThread = function(entity, callback) {
};
};
//根据ID获取文章,选择字段
//根据ID获取文章,选择字段
exports
.
getBy
IdSelectyField
=
function
(
id
,
fields
,
callback
)
{
exports
.
getBy
ConditionsSelectyField
=
function
(
conditions
,
fields
,
callback
)
{
ForumThread
.
findOne
(
{
_id
:
id
}
).
select
(
fields
).
exec
(
function
(
err
,
result
){
ForumThread
.
findOne
(
conditions
).
select
(
fields
).
exec
(
function
(
err
,
result
){
if
(
err
)
{
if
(
err
)
{
console
.
error
(
err
);
console
.
error
(
err
);
callback
(
err
,
null
);
callback
(
err
,
null
);
...
@@ -766,7 +766,8 @@ exports.getAllCountByFid = function(conditions, callback) {
...
@@ -766,7 +766,8 @@ exports.getAllCountByFid = function(conditions, callback) {
//获取话题、照片墙子文章数据
//获取话题、照片墙子文章数据
function
getSubThreads
(
doc
,
sort
,
callback
)
{
function
getSubThreads
(
doc
,
sort
,
callback
)
{
var
conditions
=
{
var
conditions
=
{
pid
:
doc
.
_id
pid
:
doc
.
_id
,
status
:
1
};
};
countAllByFid
(
conditions
,
function
(
err
,
count
)
{
countAllByFid
(
conditions
,
function
(
err
,
count
)
{
if
(
err
)
{
if
(
err
)
{
...
...
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