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
adc59954
Commit
adc59954
authored
Apr 24, 2015
by
刘文胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改举报人从session中获取
parent
e3456dc4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
forumComplaint.js
app/controllers/mobile/forumComplaint.js
+2
-1
forumComplaintService.js
app/service/forumComplaintService.js
+1
-15
No files found.
app/controllers/mobile/forumComplaint.js
View file @
adc59954
...
@@ -12,7 +12,8 @@ module.exports = function(app) {
...
@@ -12,7 +12,8 @@ module.exports = function(app) {
//增加举报
//增加举报
router
.
post
(
'/complaints'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/complaints'
,
function
(
req
,
res
,
next
)
{
var
ent_code
=
req
.
session
.
user
.
ent_code
;
var
ent_code
=
req
.
session
.
user
.
ent_code
;
ForumComplaintService
.
addComplaint
(
req
.
body
,
ent_code
,
function
(
err
,
result
){
var
uid
=
req
.
session
.
mobileForumUser
.
userId
;
ForumComplaintService
.
addComplaint
(
req
.
body
,
ent_code
,
uid
,
function
(
err
,
result
){
if
(
err
){
if
(
err
){
res
.
json
(
returnCode
.
UNCHECK_ERROR
(
err
));
res
.
json
(
returnCode
.
UNCHECK_ERROR
(
err
));
}
else
{
}
else
{
...
...
app/service/forumComplaintService.js
View file @
adc59954
...
@@ -70,24 +70,12 @@ exports.getForumComplaintPageList=function(condition,pageNo,pageSize,callback){
...
@@ -70,24 +70,12 @@ exports.getForumComplaintPageList=function(condition,pageNo,pageSize,callback){
});
});
};
};
exports
.
addComplaint
=
function
(
complaint
,
entcode
,
callback
){
exports
.
addComplaint
=
function
(
complaint
,
entcode
,
from
,
callback
){
if
(
!!!
complaint
||
!!!
complaint
.
complaintId
||
!!!
complaint
.
type
){
if
(
!!!
complaint
||
!!!
complaint
.
complaintId
||
!!!
complaint
.
type
){
return
callback
&&
callback
(
'bad args'
);
return
callback
&&
callback
(
'bad args'
);
}
}
complaint
.
ent_code
=
entcode
;
complaint
.
ent_code
=
entcode
;
async
.
waterfall
([
function
(
cb
)
{
async
.
waterfall
([
function
(
cb
)
{
/*var to =complaint.to;
delete complaint.to;
if(!!!to){
return cb();
}
ForumUserService.getUserById(to,
function(err,result){
if(!!!err && result){
complaint.complaintTo = result;
}
cb();
});*/
var
_Model
=
null
;
var
_Model
=
null
;
var
type
=
0
;
var
type
=
0
;
try
{
try
{
...
@@ -111,8 +99,6 @@ exports.addComplaint = function(complaint,entcode,callback){
...
@@ -111,8 +99,6 @@ exports.addComplaint = function(complaint,entcode,callback){
cb
();
cb
();
});
});
},
function
(
cb
)
{
},
function
(
cb
)
{
var
from
=
complaint
.
from
;
delete
complaint
.
from
;
if
(
!!!
from
){
if
(
!!!
from
){
return
cb
();
return
cb
();
}
}
...
...
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