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
c34985e1
Commit
c34985e1
authored
Jul 23, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
22
parent
877ca096
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
forumShare.js
app/controllers/mobile/forumShare.js
+7
-5
forumThread.js
app/controllers/mobile/forumThread.js
+13
-11
No files found.
app/controllers/mobile/forumShare.js
View file @
c34985e1
...
@@ -11,7 +11,8 @@ var forumThreadService = require('../../service/forumThreadService'),
...
@@ -11,7 +11,8 @@ var forumThreadService = require('../../service/forumThreadService'),
forumShareService
=
require
(
'../../service/forumShareService'
),
forumShareService
=
require
(
'../../service/forumShareService'
),
config
=
require
(
'../../../config/config'
),
config
=
require
(
'../../../config/config'
),
httpService
=
require
(
'../../service/httpService'
),
httpService
=
require
(
'../../service/httpService'
),
forumInfoService
=
require
(
'../../service/forumInfoService'
);
forumInfoService
=
require
(
'../../service/forumInfoService'
),
forumLimitActionRefService
=
require
(
'../../service/forumLimitActionRefService'
);
module
.
exports
=
function
(
app
)
{
module
.
exports
=
function
(
app
)
{
app
.
use
(
'/v1/forum'
,
router
);
app
.
use
(
'/v1/forum'
,
router
);
...
@@ -216,9 +217,10 @@ router.get('/:ent_code/share/timeline', function(req, res, next) {
...
@@ -216,9 +217,10 @@ router.get('/:ent_code/share/timeline', function(req, res, next) {
var
mid
=
req
.
session
.
openUser
.
mid
,
var
mid
=
req
.
session
.
openUser
.
mid
,
action
=
'share_timeline'
,
action
=
'share_timeline'
,
ent_code
=
req
.
session
.
user
.
ent_code
;
ent_code
=
req
.
session
.
user
.
ent_code
;
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
mid
,
function
(
err
,
flag
){
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
...
@@ -240,8 +242,8 @@ router.get('/:ent_code/share/singlemessage', function(req, res, next) {
...
@@ -240,8 +242,8 @@ router.get('/:ent_code/share/singlemessage', function(req, res, next) {
action
=
'share_singlemessage'
,
action
=
'share_singlemessage'
,
ent_code
=
req
.
session
.
user
.
ent_code
;
ent_code
=
req
.
session
.
user
.
ent_code
;
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
mi
d
,
function
(
err
,
flag
){
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userI
d
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
res
.
json
(
returnCode
.
PROHIBITION_OF_SPEECH
);
...
...
app/controllers/mobile/forumThread.js
View file @
c34985e1
...
@@ -131,8 +131,8 @@ router.get('/thread/searchComment', function(req, res, next) {
...
@@ -131,8 +131,8 @@ 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
mid
=
req
.
session
.
openUser
.
mi
d
;
var
userId
=
req
.
session
.
mobileForumUser
.
userI
d
;
forumLimitActionRefService
.
checkLimitActionProhibitionOfSpeech
(
mi
d
,
function
(
err
,
isProhibition
){
forumLimitActionRefService
.
checkLimitActionProhibitionOfSpeech
(
userI
d
,
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
);
...
@@ -151,7 +151,7 @@ router.post('/thread/create', function(req, res, next) {
...
@@ -151,7 +151,7 @@ router.post('/thread/create', function(req, res, next) {
if
(
err
)
{
if
(
err
)
{
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
mi
d
,
function
(
err
,
flag
){
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userI
d
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -267,6 +267,7 @@ router.post('/thread/:tid/delete', function(req, res, next) {
...
@@ -267,6 +267,7 @@ router.post('/thread/:tid/delete', function(req, res, next) {
//文章点赞
//文章点赞
router
.
post
(
'/thread/:tid/raise'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/thread/:tid/raise'
,
function
(
req
,
res
,
next
)
{
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
var
mid
=
req
.
session
.
openUser
.
mid
;
var
mid
=
req
.
session
.
openUser
.
mid
;
var
tid
=
req
.
params
.
tid
||
null
;
var
tid
=
req
.
params
.
tid
||
null
;
if
(
tid
)
{
if
(
tid
)
{
...
@@ -331,7 +332,7 @@ router.post('/thread/:tid/raise', function(req, res, next) {
...
@@ -331,7 +332,7 @@ router.post('/thread/:tid/raise', function(req, res, next) {
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
mi
d
,
function
(
err
,
flag
){
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userI
d
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -444,8 +445,8 @@ router.post('/thread/:tid/share', function(req, res, next) {
...
@@ -444,8 +445,8 @@ router.post('/thread/:tid/share', 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
mid
=
req
.
session
.
openUser
.
mi
d
;
var
userId
=
req
.
session
.
mobileForumUser
.
userI
d
;
forumLimitActionRefService
.
checkLimitActionProhibitionOfSpeech
(
mi
d
,
function
(
err
,
isProhibition
){
forumLimitActionRefService
.
checkLimitActionProhibitionOfSpeech
(
userI
d
,
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
);
...
@@ -546,7 +547,7 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
...
@@ -546,7 +547,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
{
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
mi
d
,
function
(
err
,
flag
){
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userI
d
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -615,8 +616,8 @@ router.post('/thread/:tid/comment/create', function(req, res, next) {
...
@@ -615,8 +616,8 @@ 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
mid
=
req
.
session
.
openUser
.
mi
d
;
var
userId
=
req
.
session
.
mobileForumUser
.
userI
d
;
forumLimitActionRefService
.
checkLimitActionProhibitionOfSpeech
(
mi
d
,
function
(
err
,
isProhibition
){
forumLimitActionRefService
.
checkLimitActionProhibitionOfSpeech
(
userI
d
,
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
);
...
@@ -695,7 +696,7 @@ router.post('/thread/:tid/comment/:cid/create', function(req, res, next) {
...
@@ -695,7 +696,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
{
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
mi
d
,
function
(
err
,
flag
){
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userI
d
,
function
(
err
,
flag
){
if
(
err
){
if
(
err
){
console
.
error
(
err
);
console
.
error
(
err
);
}
else
{
}
else
{
...
@@ -854,6 +855,7 @@ router.get('/thread/:tid/comment/list', function(req, res, next) {
...
@@ -854,6 +855,7 @@ router.get('/thread/:tid/comment/list', function(req, res, next) {
//评论点赞
//评论点赞
router
.
post
(
'/thread/:tid/comment/:cid/raise'
,
function
(
req
,
res
,
next
)
{
router
.
post
(
'/thread/:tid/comment/:cid/raise'
,
function
(
req
,
res
,
next
)
{
var
userId
=
req
.
session
.
mobileForumUser
.
userId
;
var
tid
=
req
.
params
.
tid
||
null
;
var
tid
=
req
.
params
.
tid
||
null
;
var
cid
=
req
.
params
.
cid
||
null
;
var
cid
=
req
.
params
.
cid
||
null
;
var
mid
=
req
.
session
.
openUser
.
mid
;
var
mid
=
req
.
session
.
openUser
.
mid
;
...
@@ -915,7 +917,7 @@ router.post('/thread/:tid/comment/:cid/raise', function(req, res, next) {
...
@@ -915,7 +917,7 @@ router.post('/thread/:tid/comment/:cid/raise', function(req, res, next) {
res
.
json
(
returnCode
.
BUSY
);
res
.
json
(
returnCode
.
BUSY
);
}
else
{
}
else
{
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
mi
d
,
function
(
err
,
flag
){
forumLimitActionRefService
.
checkLimitActionProhibitionAddIntegral
(
userI
d
,
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