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
be6abd19
Commit
be6abd19
authored
Sep 01, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改行为限制
parent
7921d8b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
forumThread.js
app/controllers/mobile/forumThread.js
+15
-12
No files found.
app/controllers/mobile/forumThread.js
View file @
be6abd19
...
@@ -13,7 +13,8 @@ var forumPraiseLogService = require('../../service/forumPraiseLogService');
...
@@ -13,7 +13,8 @@ var forumPraiseLogService = require('../../service/forumPraiseLogService');
var
forumShareLogService
=
require
(
'../../service/forumShareLogService'
);
var
forumShareLogService
=
require
(
'../../service/forumShareLogService'
);
var
forumCommentService
=
require
(
'../../service/forumCommentService'
);
var
forumCommentService
=
require
(
'../../service/forumCommentService'
);
var
forumUserThreadControlService
=
require
(
'../../service/forumUserThreadControlService'
);
var
forumUserThreadControlService
=
require
(
'../../service/forumUserThreadControlService'
);
var
forumLimitActionRefService
=
require
(
'../../service/forumLimitActionRefService'
);
// var forumLimitActionRefService = require('../../service/forumLimitActionRefService');
var
forumLimitOperationService
=
require
(
'../../service/forumLimitOperationService'
);
var
forumThreadAttendService
=
require
(
'../../service/forumThreadAttendService'
);
var
forumThreadAttendService
=
require
(
'../../service/forumThreadAttendService'
);
var
commentTips
=
require
(
'../../utils/commentTips'
);
var
commentTips
=
require
(
'../../utils/commentTips'
);
var
httpService
=
require
(
'../../service/httpService'
);
var
httpService
=
require
(
'../../service/httpService'
);
...
@@ -159,27 +160,29 @@ router.get('/thread/searchComment', function(req, res, next) {
...
@@ -159,27 +160,29 @@ router.get('/thread/searchComment', function(req, res, next) {
//新增论坛文章
//新增论坛文章
router
.
post
(
'/thread/create'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/thread/create'
,
function
(
req
,
res
,
next
)
{
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
}
else
{
}
else
{
if
(
isProhibition
){
if
(
isProhibition
){
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
}
else
{
}
else
{
var
integral
=
req
.
session
.
openUser
.
integral
||
0
;
var
integral
=
req
.
session
.
openUser
.
integral
||
0
;
var
exp
=
req
.
session
.
openUser
.
exp
||
0
;
var
exp
=
req
.
session
.
openUser
.
exp
||
0
;
forumRolePermissionService
.
checkRolePermiss
(
req
.
session
.
user
.
ent_code
,
'create'
,
integral
,
exp
,
function
(
err
,
result
)
{
forumRolePermissionService
.
checkRolePermiss
(
req
.
session
.
user
.
ent_code
,
'create'
,
integral
,
exp
,
function
(
err
,
result
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
if
(
result
)
{
//有操作权限
if
(
result
)
{
//有操作权限
create
(
req
,
function
(
err
,
thread
)
{
create
(
req
,
function
(
err
,
thread
)
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
console
.
log
(
'now is creating thread...'
);
forumLimitOperationService
.
checkLimitOperationProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -380,7 +383,7 @@ router.post('/thread/:tid/raise', function(req, res, next) {
...
@@ -380,7 +383,7 @@ router.post('/thread/:tid/raise', function(req, res, next) {
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -494,7 +497,7 @@ router.post('/thread/:tid/share', function(req, res, next) {
...
@@ -494,7 +497,7 @@ router.post('/thread/:tid/share', function(req, res, next) {
//新增文章评论
//新增文章评论
router
.
post
(
'/thread/:tid/comment/add'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/thread/:tid/comment/add'
,
function
(
req
,
res
,
next
)
{
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
...
@@ -600,7 +603,7 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
...
@@ -600,7 +603,7 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -643,7 +646,7 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
...
@@ -643,7 +646,7 @@ router.post('/thread/:tid/comment/add', function(req, res, next) {
//新增文章评论
//新增文章评论
router
.
post
(
'/thread/:tid/comment/create'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/thread/:tid/comment/create'
,
function
(
req
,
res
,
next
)
{
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
...
@@ -748,7 +751,7 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
...
@@ -748,7 +751,7 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -817,7 +820,7 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
...
@@ -817,7 +820,7 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
//新建文章评论的子评论
//新建文章评论的子评论
router
.
post
(
'/thread/:tid/comment/:cid/create'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/thread/:tid/comment/:cid/create'
,
function
(
req
,
res
,
next
)
{
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionOfSpeech
(
userId
,
function
(
err
,
isProhibition
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
...
@@ -900,7 +903,7 @@ router.post('/thread/:tid/comment/:cid/create', function(req, res, next) {
...
@@ -900,7 +903,7 @@ router.post('/thread/:tid/comment/:cid/create', function(req, res, next) {
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -1110,7 +1113,7 @@ router.post('/thread/:tid/comment/:cid/raise', function(req, res, next) {
...
@@ -1110,7 +1113,7 @@ router.post('/thread/:tid/comment/:cid/raise', function(req, res, next) {
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimit
ActionRefService
.
checkLimitAc
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
forumLimit
OperationService
.
checkLimitOpera
tionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
...
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