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
9c047c95
Commit
9c047c95
authored
Aug 30, 2016
by
陈志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制分享朋友圈赠送积分
parent
7cfc3603
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
18 deletions
+19
-18
forumIdentifyUser.js
app/controllers/admin/forumIdentifyUser.js
+14
-17
returnCode.js
app/utils/returnCode.js
+5
-1
No files found.
app/controllers/admin/forumIdentifyUser.js
View file @
9c047c95
...
@@ -149,26 +149,23 @@ router.post('/user/identifyUser',function(req,res,next){
...
@@ -149,26 +149,23 @@ router.post('/user/identifyUser',function(req,res,next){
}
}
});
});
//微信分享带来用户
//微信分享带来用户
//Gabriel 2016-08-30 分享带来用户,分享人获得积分,限制被禁止加积分的用户获得积分,
router
.
get
(
'/user/from/share'
,
function
(
req
,
res
,
next
)
{
router
.
get
(
'/user/from/share'
,
function
(
req
,
res
,
next
)
{
// var userId = req.session.mobileForumUser.userId;
var
mid
=
req
.
query
.
mid
,
var
mid
=
req
.
query
.
mid
,
action
=
req
.
query
.
action
,
action
=
req
.
query
.
action
,
ent_code
=
req
.
query
.
ent_code
;
ent_code
=
req
.
query
.
ent_code
,
userId
=
req
.
query
.
userId
;
// forumLimitOperationService.checkLimitOperationProhibitionAddIntegral(userId, function(err, flag){
console
.
log
(
'分享带来用户获取积分 mid = '
+
mid
+
' userId = '
+
userId
);
// if(err){
forumLimitOperationService
.
checkLimitOperationProhibitionAddIntegral
(
userId
,
function
(
err
,
flag
){
// console.error(err);
console
.
log
(
' 是否限制赠送积分 flag = '
+
flag
);
// res.json(returnCode.PROHIBITION_OF_SPEECH);
if
(
err
||
flag
){
// }else{
console
.
error
(
err
||
returnCode
.
PROHIBITION_OF_INC_INTEGRAL
);
// if(flag){
res
.
json
(
returnCode
.
PROHIBITION_OF_INC_INTEGRAL
);
// res.json(returnCode.PROHIBITION_OF_SPEECH);
}
else
{
// }else{
httpService
.
sendRequest
(
ent_code
,
mid
,
action
);
httpService
.
sendRequest
(
ent_code
,
mid
,
action
);
res
.
status
(
200
).
end
();
res
.
status
(
200
).
end
();
}
// }
});
// }
// });
});
});
//检查用户权限 旧版
//检查用户权限 旧版
...
...
app/utils/returnCode.js
View file @
9c047c95
...
@@ -46,10 +46,14 @@ module.exports = {
...
@@ -46,10 +46,14 @@ module.exports = {
errorcode
:
10008
,
errorcode
:
10008
,
errormsg
:
'内容超出限制'
errormsg
:
'内容超出限制'
},
},
CAN_NOT_DELETE_INFO
:
{
CAN_NOT_DELETE_INFO
:{
errorcode
:
10009
,
errorcode
:
10009
,
errormsg
:
'不能删除,请先转移版块下的帖子'
errormsg
:
'不能删除,请先转移版块下的帖子'
},
},
PROHIBITION_OF_INC_INTEGRAL
:
{
errorcode
:
10010
,
errormsg
:
'已被禁止积分'
},
UNCHECK_ERROR
:
function
(
msg
){
UNCHECK_ERROR
:
function
(
msg
){
return
{
return
{
errorcode
:
9999
,
errorcode
:
9999
,
...
...
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